问题:复用java类时报错:The hierarchy of the type is inconsistent
原因:该类或其父类所在的jar包没有被引入
建议解决方案:从该类的父类开始跟踪源码,找到其所在的jar包并引入项目中
一般是因为 缺少依赖添加上依赖即可
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>