最近在学用 spring boot 做项目,碰到一个问题,tomcat下正常运行的项目到jetty里老出问题,
搜了好多次,终于找到如下内容:
[url]http://stackoverflow.com/questions/32643530/classpath-issue-between-jetty-maven-plugin-and-tomcat-jdbc-8-0-9-leading-to-ser[/url]
把tomcat-judi变成provided
添加文件 WEB-INF/jetty-web.xml
搜了好多次,终于找到如下内容:
[url]http://stackoverflow.com/questions/32643530/classpath-issue-between-jetty-maven-plugin-and-tomcat-jdbc-8-0-9-leading-to-ser[/url]
把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>