IDEA启动项目时报错如下:
2023-02-07 12:34:53,489 [main] INFO o.a.catalina.core.StandardService - Stopping service [Tomcat]
2023-02-07 12:34:53,500 [main] WARN o.a.c.loader.WebappClassLoaderBase - The web application [ROOT] appears to have started a thread named [ConfigBus-SpringValueRegistry-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
2023-02-07 12:34:53,509 [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-02-07 12:34:53,566 [main] ERROR 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:
com.github.xiaoymin.swaggerbootstrapui.service.SwaggerResourcesExtProvider.<init>(SwaggerResourcesExtProvider.java:52)
The following method did not exist:
springfox.documentation.schema.ClassSupport.classByName(Ljava/lang/String;)Lcom/google/common/base/Optional;
The calling method's class, com.github.xiaoymin.swaggerbootstrapui.service.SwaggerResourcesExtProvider, was loaded from the following location:
jar:file:/C:/Users/SNT202006001/.m2/repository/com/github/xiaoymin/swagger-bootstrap-ui/1.9.6/swagger-bootstrap-ui-1.9.6.jar!/com/github/xiaoymin/swaggerbootstrapui/service/SwaggerResourcesExtProvider.class
The called method's class, springfox.documentation.schema.ClassSupport, is available from the following locations:
jar:file:/C:/Users/SNT202006001/.m2/repository/io/springfox/springfox-core/3.0.0/springfox-core-3.0.0.jar!/springfox/documentation/schema/ClassSupport.class
The called method's class hierarchy was loaded from the following locations:
springfox.documentation.schema.ClassSupport: file:/C:/Users/SNT202006001/.m2/repository/io/springfox/springfox-core/3.0.0/springfox-core-3.0.0.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes com.github.xiaoymin.swaggerbootstrapui.service.SwaggerResourcesExtProvider and springfox.documentation.schema.ClassSupport
检查代码,把@EnableSwaggerBootstrapUI注解去掉;
重启项目