您的位置:首页 > 编程语言 > Java开发

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

2016-12-28 16:56 736 查看
  在Spring的配置文件applicationContext.xml中

<!-- 自动扫描与装配bean -->
<context:component-scan base-package="cn.itcast.oa"></context:component-scan>


当运行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

  spring的版本太低了,tomcat的配置中更换一个低版本的jdk,解决问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐