今天用tomcat部署了另一个项目,一直提示“Caused by: 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”,后来将jdk版本由1.8更换为1.7就能正常启动,原来是org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser自动检测,jdk版本检测时需要jdk1.5以上版本,但是只检查到了jdk1.7,jdk1.8版本没有检测成功。
版权声明:本文为fsz911223原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。