最近公司架构正在升级,今天打包后启动Tomcat时发现报错Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher,在排查时发现是因为引用的sping2.5.6会自动检测jdk的版本,但只会检测到1.7,而我们使用的1.8,匹配不到也会报错,可升级架包或修改JdkVersion源码。
修改源码可参考http://fanli7.net/a/JAVAbiancheng/Spring/20140321/481981.html