spring-boot - 我正在尝试一个 Spring Boot 示例,但它显示以下错误.. 我该怎么办?
问题描述
启动 ApplicationContext 时出错。要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。2020-03-26 11:37:05.248 错误 9332 --- [restartedMain] osbdLoggingFailureAnalysisReporter:
应用程序无法启动
描述:
试图调用不存在的方法。尝试是从以下位置进行的:
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 版本
解决方案
请将您的一些代码片段放在这里,例如 application.properties 文件、main 和 ...。或者您可以将您的应用程序推送到 github 并将您的存储库地址放在这里然后我会检查它。
推荐阅读
- scala - 不能在自写的 monad 实例上使用 flatMap 作为扩展方法
- python - 在导入的模块中无法访问 Python 类实例变量
- c - 在linux内核中发送数据包
- php - 从数据库中成功删除后,AJAX 删除表行而不重新加载页面
- reactjs - 如何在反应中显示分页表
- c - 在C中打印一条具有均匀空格的行?
- python - 按照约定用特殊字符格式化字符串
- python - 使用命令行升级 pip,现在 Jupyter 笔记本不工作
- .net - 无法使用 InstanceName 连接到 SQL Server LocalDB,但命名管道可以工作 (.NET/SQL Server 15)
- javascript - 具有周期性数据的对象数组到具有累积数据的对象数组