Context namespace element 'component-scan' its parser class are only available on JDK 1.5 and higher

运行tomcat的时候,出现下面的错误
java.lang.IllegalStateException: Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

原因:主要是因为spring的版本低所导致的问题,但是你可能会有疑问,明明,我的项目中用到的spring的版本明明已经是新版本,怎么可能存在低版本的问题呢?

此时,你需要检查你的pom.xml文件中是否有使用的到dubbo,因为dubbo一来了一个旧版本的spring,所以导致此问题发生;解决方案如下:
配置忽略dubbo中的spring版本

猜你喜欢

转载自blog.csdn.net/whiteGu/article/details/82714881