1:报错内容
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.apache.catalina.startup.Tomcat.<clinit>(Tomcat.java:1393)
The following method did not exist:
org.apache.tomcat.util.compat.JreCompat.isGraalAvailable()Z
The method's class, org.apache.tomcat.util.compat.JreCompat, is available from the following locations:
jar:file:/C:/Users/ywy/.m2/repository/org/apache/tomcat/tomcat-util/9.0.8/tomcat-util-9.0.8.jar!/org/apache/tomcat/util/compat/JreCompat.class
jar:file:/C:/Users/ywy/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.24/tomcat-embed-core-9.0.24.jar!/org/apache/tomcat/util/compat/JreCompat.class
It was loaded from the following location:
file:/C:/Users/ywy/.m2/repository/org/apache/tomcat/tomcat-util/9.0.8/tomcat-util-9.0.8.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.apache.tomcat.util.compat.JreCompat
Disconnected from the target VM, address: '127.0.0.1:56011', transport: 'socket'
Process finished with exit code 0
2:我的解决方式
减低版本号
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-util</artifactId>
<version>8.5.30</version>
</dependency>