1.看日志,定位到报错的类。
2.使用arthas jad反编译这个类:jad 类的全限定名,可以看到这个类的源码和所在的jar包,看到这个jar包不是我们需要的jar包,这个jar包和正确的jar包拥有同名同包的类导致报错。
3.在pom.xml里看到错误的jar包是<parent>标签引入的,在<dependency>里进行排除。
<dependency>
<groupId></groupId>
<artifactId></artifactId>
<scope>test</scope>
</dependency>