我正在Spring Boot中开发一个API,我想使用已经安装在我的服务器中的Jetty(9.4.1.v20170120)来部署它,但我在尝试它时遇到了很多问题,我的问题是,有谁知道用Spring Boot + Jetty + JPA + MySQL启动项目的基本配置是什么?如果你有一个我可以使用的模板,我将不胜感激!现在,如果你认为你可以解释我,你想要钱,只需告诉我!我非常紧张,试图让它工作,我一直在浪费我的时间在谷歌搜索,但我没有找到有用的东西:(提前谢谢!
UPD:在我试过的所有事情中,正如Dirk所说,我改变了我的pom.xml,它看起来如下:<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vibradeporte</groupId>
<artifactId>jetty-test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>jetty-test</name>
<description></description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
然后,如果我尝试在本地执行它,它运行没有问题但是当我将war文件上传到我的服务器(我已安装jetty 9.4.1.v20170120)时,服务器向我显示:
** WARNING: JETTY_LOGS is Deprecated. Please configure logging within the jetty base.
Starting Jetty: 2018-05-21 13:33:10.930:INFO::main: Logging initialized @144ms to org.eclipse.jetty.util.log.StdErrLog
2018-05-21 13:33:11.141:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2018-05-21 13:33:11.196:INFO:oejs.Server:main: jetty-9.4.1.v20170120
2018-05-21 13:33:11.228:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///usr/share/jetty/jetty-distribution-9.4.1.v20170120/webapps/] at interval 1
2018-05-21 13:33:13.446:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=1770ms
2018-05-21 13:33:13.447:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@5ae9a829{/jetty-test-0.0.1-SNAPSHOT,file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/,UNAVAILABLE}{/jetty-test-0.0.1-SNAPSHOT.war}
MultiException[java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-tree-6.1.1.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-6.1.1.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-analysis-6.1.1.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-commons-6.1.1.jar]
at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:452)
at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:365)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:512)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1437)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:788)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:499)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:147)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:452)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:561)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:452)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:419)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1511)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1438)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1437)
Suppressed:
|java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-6.1.1.jar
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
|Caused by:
|java.lang.IllegalArgumentException
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
Suppressed:
|java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-analysis-6.1.1.jar
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
|Caused by:
|java.lang.IllegalArgumentException
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
Suppressed:
|MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar, java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar]
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:878)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
|Suppressed:
| |java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar
| | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| | at java.lang.Thread.run(Thread.java:748)
| |Caused by:
| |java.lang.IllegalArgumentException
| | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| | at java.lang.Thread.run(Thread.java:748)
|Suppressed:
| |java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar
| | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| | at java.lang.Thread.run(Thread.java:748)
| |Caused by:
| |java.lang.IllegalArgumentException
| | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| | at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| | at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| | at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| | at java.lang.Thread.run(Thread.java:748)
|Caused by:
|java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/log4j-api-2.10.0.jar
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
|Caused by:
|java.lang.IllegalArgumentException
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
Suppressed:
|java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-commons-6.1.1.jar
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
|Caused by:
|java.lang.IllegalArgumentException
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
| at java.lang.Thread.run(Thread.java:748)
Caused by:
java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///tmp/jetty-0.0.0.0-8080-jetty-test-0.0.1-SNAPSHOT.war-_jetty-test-0.0.1-SNAPSHOT-any-6309295758354144012.dir/webapp/WEB-INF/lib/asm-tree-6.1.1.jar
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.lang.Thread.run(Thread.java:748)
Caused by:
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:464)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.lang.Thread.run(Thread.java:748)
2018-05-21 13:33:14.139:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=230ms
FAILED Mon May 21 13:33:14 -05 2018
答案 0 :(得分:0)
排除 tomcat 并添加 jetty
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
答案 1 :(得分:0)
最后,我可以解决它,需要考虑两件事:
<dependency>
< groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
&#13;
就是这样!