树_tree 2021-07-08 12:14 采纳率: 100%
浏览 57
已采纳

SpringBoot的启动异常

img

我第一次配置SpringBoot的项目
看着尚硅谷的雷神教程,创建一个Maven项目然后导入Maven的依赖进行测试

应该是我的环境出现问题,但是不知道怎么去操作


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-07-08 12:01:33.218 ERROR 1600 --- [           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.configureTldSkipPatterns(TomcatServletWebServerFactory.java:260)

The following method did not exist:

    org.apache.tomcat.JarScanner.setJarScanFilter(Lorg/apache/tomcat/JarScanFilter;)V

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

    jar:file:/D:/JDK/JDK/jre/lib/ext/tomcat-api.jar!/org/apache/tomcat/JarScanner.class
    jar:file:/D:/JDK/JDK/jre/lib/ext/tomcat-api.jar!/org/apache/tomcat/JarScanner.class
    jar:file:/G:/Maven_jar/org/apache/tomcat/embed/tomcat-embed-core/9.0.38/tomcat-embed-core-9.0.38.jar!/org/apache/tomcat/JarScanner.class

The class hierarchy was loaded from the following locations:

    org.apache.tomcat.JarScanner: file:/D:/JDK/JDK/jre/lib/ext/tomcat-api.jar


Action:

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


Process finished with exit code 1

  • 写回答

2条回答 默认 最新

  • 凡人歌者徐 2021-07-08 14:21
    关注

    看错误是包冲突了,把/D:/JDK/JDK/jre/lib/ext/tomcat-api.jar这个jar包移除,这样程序就会去找maven管理的那个内置tomcat的相关jar包了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 已采纳回答 7月8日

悬赏问题

  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示