Spring boot 启动报错求接

启动报错 求解

2021-09-01 14:56:19.128  INFO 17728 --- [  restartedMain] com.zdww.ygt.YgtApplication              : Starting YgtApplication on LAPTOP-ASC78MR3 with PID 17728 (D:\JetBrains\ygt-interface\target\classes started by lenovo in D:\JetBrains\ygt-interface)
2021-09-01 14:56:19.130  INFO 17728 --- [  restartedMain] com.zdww.ygt.YgtApplication              : The following profiles are active: dev
2021-09-01 14:56:19.169  INFO 17728 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in D:\MavenLocalRepository\cn\easyproject\orai18n\12.1.0.2.0\orai18n-12.1.0.2.0.jar referenced one or more files that do not exist: file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-mapping.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-utility.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-collation.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-translation.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-net.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-servlet.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-lcsd.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/orai18n-tools.jar,file:/D:/MavenLocalRepository/cn/easyproject/orai18n/12.1.0.2.0/gdk_custom.jar
2021-09-01 14:56:19.170  INFO 17728 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2021-09-01 14:56:19.170  INFO 17728 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2021-09-01 14:56:19.744  WARN 17728 --- [  restartedMain] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[com.zdww.ygt]' package. Please check your configuration.
2021-09-01 14:56:20.130  WARN 17728 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.NoSuchMethodError: org.apache.tomcat.util.modeler.Registry.disableRegistry()V
2021-09-01 14:56:20.139  INFO 17728 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-09-01 14:56:20.144 ERROR 17728 --- [  restartedMain] 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:

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

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

    jar:file:/D:/MavenLocalRepository/org/apache/tomcat/embed/tomcat-embed-core/8.5.63/tomcat-embed-core-8.5.63.jar!/org/apache/tomcat/util/modeler/Registry.class

It was loaded from the following location:

    file:/D:/MavenLocalRepository/org/apache/tomcat/embed/tomcat-embed-core/8.5.63/tomcat-embed-core-8.5.63.jar


Action:

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


Process finished with exit code 0

maven引用的jar有问题,
删除 本地 maven仓库的jar,然后重新下载,重新运行即可!

It was loaded from the following location:
file:/D:/MavenLocalRepository/org/apache/tomcat/embed/tomcat-embed-core/8.5.63/tomcat-embed-core-8.5.63.jar 这个jar包有问题

img
reload程序中的jar包就可以了

1,用自带的setting.xml
2,刷新maven

你当前引用的这个内置tomcat版本中没有这个方法吧,尝试换一下内置tomcat版本