【问题标题】:am trying a Spring boot example but it is showing following error.. what should i do?我正在尝试一个 Spring Boot 示例,但它显示以下错误.. 我该怎么办?
【发布时间】:2020-07-06 18:27:06
【问题描述】:

启动 ApplicationContext 时出错。要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。 2020-03-26 11:37:05.248 错误 9332 --- [restartedMain] o.s.b.d.LoggingFailureAnalysisReporter:


应用程序启动失败


说明:

试图调用一个不存在的方法。尝试从以下位置进行:

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

以下方法不存在:

org.apache.tomcat.util.modeler.Registry.disableRegistry()V

该方法的类 org.apache.tomcat.util.modeler.Registry 可从以下位置获得:

jar:file:/C:/Program%20Files/Java/jre1.8.0_77/lib/ext/tomcat-coyote.jar!/org/apache/tomcat/util/modeler/Registry.class
jar:file:/C:/Users/hp/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.31/tomcat-embed-core-9.0.31.jar!/org/apache/tomcat/util/modeler/Registry.class

它是从以下位置加载的:

file:/C:/Program%20Files/Java/jre1.8.0_77/lib/ext/tomcat-coyote.jar

行动:

更正应用程序的类路径,使其包含一个兼容的 org.apache.tomcat.util.modeler.Registry 版本

【问题讨论】:

    标签: spring-boot


    【解决方案1】:

    请把你的一些代码sn-p放在这里,比如application.properties文件,main和...。或者你可以将你的应用推送到 github 并把你的仓库地址放在这里然后我会检查它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-07
      • 2016-03-07
      • 1970-01-01
      • 2022-01-11
      相关资源
      最近更新 更多