解决The hierarchy of the type is inconsistent错误

版权声明:本文为博主原创文章,未经博主允许不得转载。http://mp.blog.csdn.net/configure#i https://blog.csdn.net/wangming520liwei/article/details/83339331

问题:复用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>

猜你喜欢

转载自blog.csdn.net/wangming520liwei/article/details/83339331