项目中用的spring框架,之前项目在jdk1.7下面运行的好好地,但是到了jdk1.8的时候,就爆下面这个错误。
Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher
网友给的原理:
就是spring的版本太低了(我当时用的spring2.5)spring2.5出来的时候,jdk1.8还没有出来,所以spring2.5不支持jdk1.8
于是换回了jdk7,问题就解决了。