使用tomacat发布的时候一开始还没有这个问题。不知道什么时候就突然出现这个问题了。
全部的描述是这样的:
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition.<init>(AnnotatedGenericBeanDefinition.java:58)
24-Nov-2019 10:03:33.977 涓ラ噸 [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
The following method did not exist:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/education]]
org.springframework.core.type.AnnotationMetadata.introspect(Ljava/lang/Class;)Lorg/springframework/core/type/AnnotationMetadata;
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
The method's class, org.springframework.core.type.AnnotationMetadata, is available from the following locations:
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:744)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)
jar:file:/D:/apache-tomcat-8.5.42/webapps/education/WEB-INF/lib/spring-core-5.1.10.RELEASE.jar!/org/springframework/core/type/AnnotationMetadata.class
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1851)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
It was loaded from the following location:
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
file:/D:/apache-tomcat-8.5.42/webapps/education/WEB-INF/lib/spring-core-5.1.10.RELEASE.jar
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
造成错误的原因是什么呢?是因为我使用错误的打包问题打过一次包。然后扔到了tomcat下执行了一下。最后忘记了删除了。