`
dwangel
  • 浏览: 261452 次
社区版块
存档分类
最新评论

2 spring webapplicationinitializers detected on classpath

 
阅读更多
最近在学用 spring boot 做项目,碰到一个问题,tomcat下正常运行的项目到jetty里老出问题,
搜了好多次,终于找到如下内容:

http://stackoverflow.com/questions/32643530/classpath-issue-between-jetty-maven-plugin-and-tomcat-jdbc-8-0-9-leading-to-ser

把tomcat-judi变成provided
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-juli</artifactId>
      <version>8.5.5</version>
			<scope>provided</scope>
		</dependency>


添加文件 WEB-INF/jetty-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Call name="setParentLoaderPriority">
    <Arg type="boolean">true</Arg>
  </Call>
</Configure>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics