3

我将我的项目从 Spring Boot 1.5.6.RELEASE 更新到 2.2.5.RELEASE,现在我收到一个错误,声称无法启动 Web 服务器,因为 org.apache.tomcat.util.modeler.Registry.disableRegistry() 不能成立。这是 Spring 发出的调用,不受我控制。我有org.apache.tomcat tomcat-servlet-apiorg.apache.tomcat tomcat-catalina 9.0.33 版作为依赖项,它们非常新。

错误消息本身似乎很冗长,但我真的不明白我应该做什么。我认为篡改类路径不是我的工作。

"C:\Program Files\JetBrains\IntelliJ IDEA 2020.3.1\jbr\bin\java.exe" 

-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61285,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\TMitk\.IntelliJIdea2019.3\system\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Users\TMitk\MEGA\home\EDC\ccbus\seagullsreuse\target\classes;C:\Users\TMitk\.m2\repository\io\jsonwebtoken\jjwt\0.6.0\jjwt-0.6.0.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\1.5.6.RELEASE\spring-boot-starter-data-jpa-1.5.6.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.5.RELEASE\spring-boot-starter-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot\2.2.5.RELEASE\spring-boot-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.2.5.RELEASE\spring-boot-autoconfigure-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.5.RELEASE\spring-boot-starter-logging-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\TMitk\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;C:\Users\TMitk\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;C:\Users\TMitk\.m2\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;C:\Users\TMitk\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.2.5.RELEASE\spring-boot-starter-aop-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\aspectj\aspectjweaver\1.9.5\aspectjweaver-1.9.5.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.2.5.RELEASE\spring-boot-starter-jdbc-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\com\zaxxer\HikariCP\3.4.2\HikariCP-3.4.2.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-jdbc\5.2.4.RELEASE\spring-jdbc-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\hibernate\hibernate-core\5.4.12.Final\hibernate-core-5.4.12.Final.jar;C:\Users\TMitk\.m2\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;C:\Users\TMitk\.m2\repository\javax\persistence\javax.persistence-api\2.2\javax.persistence-api-2.2.jar;C:\Users\TMitk\.m2\repository\org\javassist\javassist\3.24.0-GA\javassist-3.24.0-GA.jar;C:\Users\TMitk\.m2\repository\net\bytebuddy\byte-buddy\1.10.8\byte-buddy-1.10.8.jar;C:\Users\TMitk\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\TMitk\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.1.1.Final\jboss-transaction-api_1.2_spec-1.1.1.Final.jar;C:\Users\TMitk\.m2\repository\org\jboss\jandex\2.1.1.Final\jandex-2.1.1.Final.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\TMitk\.m2\repository\org\dom4j\dom4j\2.1.1\dom4j-2.1.1.jar;C:\Users\TMitk\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.0.Final\hibernate-commons-annotations-5.1.0.Final.jar;C:\Users\TMitk\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.2\jaxb-runtime-2.3.2.jar;C:\Users\TMitk\.m2\repository\org\glassfish\jaxb\txw2\2.3.2\txw2-2.3.2.jar;C:\Users\TMitk\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.8\istack-commons-runtime-3.0.8.jar;C:\Users\TMitk\.m2\repository\org\jvnet\staxex\stax-ex\1.8.1\stax-ex-1.8.1.jar;C:\Users\TMitk\.m2\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.16\FastInfoset-1.2.16.jar;C:\Users\TMitk\.m2\repository\org\hibernate\hibernate-entitymanager\5.4.12.Final\hibernate-entitymanager-5.4.12.Final.jar;C:\Users\TMitk\.m2\repository\javax\transaction\javax.transaction-api\1.3\javax.transaction-api-1.3.jar;C:\Users\TMitk\.m2\repository\org\springframework\data\spring-data-jpa\2.2.5.RELEASE\spring-data-jpa-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\data\spring-data-commons\2.2.5.RELEASE\spring-data-commons-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-orm\5.2.4.RELEASE\spring-orm-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-aspects\5.2.4.RELEASE\spring-aspects-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.5.RELEASE\spring-boot-starter-web-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.5.RELEASE\spring-boot-starter-json-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.2\jackson-datatype-jdk8-2.10.2.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.2\jackson-datatype-jsr310-2.10.2.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.2\jackson-module-parameter-names-2.10.2.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-validation\2.2.5.RELEASE\spring-boot-starter-validation-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;C:\Users\TMitk\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.18.Final\hibernate-validator-6.0.18.Final.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-web\5.2.4.RELEASE\spring-web-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\mysql\mysql-connector-java\8.0.19\mysql-connector-java-8.0.19.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.2.5.RELEASE\spring-boot-starter-tomcat-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.37\tomcat-embed-core-8.5.37.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.37\tomcat-embed-el-8.5.37.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.37\tomcat-embed-websocket-8.5.37.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-catalina\9.0.22\tomcat-catalina-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-jsp-api\8.5.37\tomcat-jsp-api-8.5.37.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-el-api\8.5.37\tomcat-el-api-8.5.37.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-juli\9.0.22\tomcat-juli-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-annotations-api\8.5.37\tomcat-annotations-api-8.5.37.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-api\9.0.22\tomcat-api-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-jni\9.0.22\tomcat-jni-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-coyote\9.0.22\tomcat-coyote-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-util\9.0.22\tomcat-util-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-util-scan\9.0.22\tomcat-util-scan-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-jaspic-api\9.0.22\tomcat-jaspic-api-9.0.22.jar;C:\Users\TMitk\.m2\repository\org\apache\tomcat\tomcat-servlet-api\9.0.33\tomcat-servlet-api-9.0.33.jar;C:\Users\TMitk\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.2\jakarta.xml.bind-api-2.3.2.jar;C:\Users\TMitk\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-core\5.2.4.RELEASE\spring-core-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-jcl\5.2.4.RELEASE\spring-jcl-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\webjars\webjars-locator\0.32\webjars-locator-0.32.jar;C:\Users\TMitk\.m2\repository\org\webjars\webjars-locator-core\0.41\webjars-locator-core-0.41.jar;C:\Users\TMitk\.m2\repository\io\github\classgraph\classgraph\4.8.44\classgraph-4.8.44.jar;C:\Users\TMitk\.m2\repository\org\webjars\npm\angular__http\2.4.10\angular__http-2.4.10.jar;C:\Users\TMitk\.m2\repository\org\webjars\sockjs-client\1.0.2\sockjs-client-1.0.2.jar;C:\Users\TMitk\.m2\repository\org\webjars\stomp-websocket\2.3.3\stomp-websocket-2.3.3.jar;C:\Users\TMitk\.m2\repository\org\webjars\bootstrap\3.3.7\bootstrap-3.3.7.jar;C:\Users\TMitk\.m2\repository\org\webjars\jquery\3.1.0\jquery-3.1.0.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-websocket\2.2.5.RELEASE\spring-boot-starter-websocket-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-messaging\5.2.4.RELEASE\spring-messaging-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-websocket\5.2.4.RELEASE\spring-websocket-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\jxls\jxls-poi\1.0.11\jxls-poi-1.0.11.jar;C:\Users\TMitk\.m2\repository\org\jxls\jxls\2.8.0\jxls-2.8.0.jar;C:\Users\TMitk\.m2\repository\org\apache\commons\commons-jexl3\3.1\commons-jexl3-3.1.jar;C:\Users\TMitk\.m2\repository\commons-beanutils\commons-beanutils\1.9.3\commons-beanutils-1.9.3.jar;C:\Users\TMitk\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\TMitk\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\TMitk\.m2\repository\org\apache\poi\poi\3.14\poi-3.14.jar;C:\Users\TMitk\.m2\repository\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;C:\Users\TMitk\.m2\repository\org\apache\poi\poi-ooxml\3.14\poi-ooxml-3.14.jar;C:\Users\TMitk\.m2\repository\org\apache\poi\poi-ooxml-schemas\3.14\poi-ooxml-schemas-3.14.jar;C:\Users\TMitk\.m2\repository\org\apache\xmlbeans\xmlbeans\2.6.0\xmlbeans-2.6.0.jar;C:\Users\TMitk\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\Users\TMitk\.m2\repository\com\github\virtuald\curvesapi\1.03\curvesapi-1.03.jar;C:\Users\TMitk\.m2\repository\org\apache\commons\commons-jexl\2.1.1\commons-jexl-2.1.1.jar;C:\Users\TMitk\.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;C:\Users\TMitk\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.30\jcl-over-slf4j-1.7.30.jar;C:\Users\TMitk\.m2\repository\org\springframework\data\spring-data-redis\1.6.4.RELEASE\spring-data-redis-1.6.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-tx\5.2.4.RELEASE\spring-tx-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-oxm\5.2.4.RELEASE\spring-oxm-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-aop\5.2.4.RELEASE\spring-aop-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-context-support\5.2.4.RELEASE\spring-context-support-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\com\itextpdf\itextpdf\5.5.12\itextpdf-5.5.12.jar;C:\Users\TMitk\.m2\repository\org\apache\pdfbox\pdfbox\2.0.7\pdfbox-2.0.7.jar;C:\Users\TMitk\.m2\repository\org\apache\pdfbox\fontbox\2.0.7\fontbox-2.0.7.jar;C:\Users\TMitk\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\TMitk\.m2\repository\com\lowagie\itext\2.1.7\itext-2.1.7.jar;C:\Users\TMitk\.m2\repository\bouncycastle\bcmail-jdk14\138\bcmail-jdk14-138.jar;C:\Users\TMitk\.m2\repository\bouncycastle\bcprov-jdk14\138\bcprov-jdk14-138.jar;C:\Users\TMitk\.m2\repository\org\bouncycastle\bctsp-jdk14\1.38\bctsp-jdk14-1.38.jar;C:\Users\TMitk\.m2\repository\org\bouncycastle\bcprov-jdk14\1.38\bcprov-jdk14-1.38.jar;C:\Users\TMitk\.m2\repository\org\bouncycastle\bcmail-jdk14\1.38\bcmail-jdk14-1.38.jar;C:\Users\TMitk\.m2\repository\joda-time\joda-time\2.10.5\joda-time-2.10.5.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-mail\1.4.3.RELEASE\spring-boot-starter-mail-1.4.3.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-context\5.2.4.RELEASE\spring-context-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\com\sun\mail\javax.mail\1.5.6\javax.mail-1.5.6.jar;C:\Users\TMitk\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\TMitk\.m2\repository\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;C:\Users\TMitk\.m2\repository\javax\servlet\jstl\1.2\jstl-1.2.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-webmvc\5.2.4.RELEASE\spring-webmvc-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-beans\5.2.4.RELEASE\spring-beans-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\springframework\spring-expression\5.2.4.RELEASE\spring-expression-5.2.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\javax\servlet\jsp\javax.servlet.jsp-api\2.3.1\javax.servlet.jsp-api-2.3.1.jar;C:\Users\TMitk\.m2\repository\javax\servlet\jsp\jstl\javax.servlet.jsp.jstl-api\1.2.1\javax.servlet.jsp.jstl-api-1.2.1.jar;C:\Users\TMitk\.m2\repository\taglibs\standard\1.1.2\standard-1.1.2.jar;C:\Users\TMitk\.m2\repository\org\springframework\boot\spring-boot-starter-thymeleaf\2.2.5.RELEASE\spring-boot-starter-thymeleaf-2.2.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\thymeleaf\extras\thymeleaf-extras-java8time\3.0.4.RELEASE\thymeleaf-extras-java8time-3.0.4.RELEASE.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-hibernate5\2.8.9\jackson-datatype-hibernate5-2.8.9.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.2\jackson-core-2.10.2.jar;C:\Users\TMitk\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.9\jackson-databind-2.8.9.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.2\jackson-annotations-2.10.2.jar;C:\Users\TMitk\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-joda\2.10.2\jackson-datatype-joda-2.10.2.jar;C:\Users\TMitk\.m2\repository\ccbus\connect\ccbus-connect\1.0.0\ccbus-connect-1.0.0.jar;C:\Users\TMitk\.m2\repository\ccbus\system\ccbus-system\1.0.0\ccbus-system-1.0.0.jar;C:\Users\TMitk\.m2\repository\org\eclipse\persistence\javax.persistence\2.2.1\javax.persistence-2.2.1.jar;C:\Users\TMitk\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;C:\Users\TMitk\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;C:\Users\TMitk\.m2\repository\org\thymeleaf\thymeleaf-spring5\3.0.11.RELEASE\thymeleaf-spring5-3.0.11.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\thymeleaf\thymeleaf\3.0.11.RELEASE\thymeleaf-3.0.11.RELEASE.jar;C:\Users\TMitk\.m2\repository\ognl\ognl\3.1.12\ognl-3.1.12.jar;C:\Users\TMitk\.m2\repository\org\attoparser\attoparser\2.0.5.RELEASE\attoparser-2.0.5.RELEASE.jar;C:\Users\TMitk\.m2\repository\org\unbescape\unbescape\1.1.6.RELEASE\unbescape-1.1.6.RELEASE.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\lib\idea_rt.jar" com.edatachase.seagullsreuse.Application
Connected to the target VM, address: '128.0.0.1:61285', transport: 'socket'

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.2.5.RELEASE)

2020-03-24 12:37:01.473  INFO 21376 --- [           main] c.edatachase.seagullsreuse.Application   : Starting Application on DESKTOP-IQJMQ14 with PID 21376 (C:\Users\TMitk\MEGA\home\EDC\ccbus\seagullsreuse\target\classes started by TMitk in C:\Users\TMitk\MEGA\home\EDC\ccbus\seagullsreuse)
2020-03-24 12:37:01.476  INFO 21376 --- [           main] c.edatachase.seagullsreuse.Application   : No active profile set, falling back to default profiles: default
2020-03-24 12:37:02.063  INFO 21376 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-03-24 12:37:02.166  INFO 21376 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 95ms. Found 7 JPA repository interfaces.
2020-03-24 12:37:02.631  WARN 21376 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.NoSuchMethodError: 'void org.apache.tomcat.util.modeler.Registry.disableRegistry()'
2020-03-24 12:37:02.640  INFO 21376 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-03-24 12:37:02.646 ERROR 21376 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:175)

The following method did not exist:

    'void org.apache.tomcat.util.modeler.Registry.disableRegistry()'

The method's class, org.apache.tomcat.util.modeler.Registry, is available from the following locations:

    jar:file:/C:/Users/TMitk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.37/tomcat-embed-core-8.5.37.jar!/org/apache/tomcat/util/modeler/Registry.class
    jar:file:/C:/Users/TMitk/.m2/repository/org/apache/tomcat/tomcat-coyote/9.0.22/tomcat-coyote-9.0.22.jar!/org/apache/tomcat/util/modeler/Registry.class

It was loaded from the following location:

    file:/C:/Users/TMitk/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.37/tomcat-embed-core-8.5.37.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.apache.tomcat.util.modeler.Registry

Disconnected from the target VM, address: '127.0.0.1:61285', transport: 'socket'

Process finished with exit code 1
4

2 回答 2

1

好的,我设法解决了这个问题。我手动删除了org/apache/tomcat/embed.m2/repository 中的目录。然后我添加为单独的依赖项

org.apache.tomcat.embed tomcat-embed-core
org.apache.tomcat.embed tomcat-embed-el
org.apache.tomcat.embed tomcat-embed-jasper
org.apache.tomcat.embed tomcat-embed-websocket

全部在版本 9.0.33

于 2020-03-25T11:17:48.540 回答
0

我有同样的问题并在降级到 Spring Boot 版本 2.0.9.RELEASE 后得到解决,因为它与 tomcat 8.5.X 兼容,而不是 9。

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-tomcat/2.0.9.RELEASE

于 2020-12-22T18:40:32.820 回答