[spring]Attribute "scope" must be declared for element type "bean"

原来Attribute "scope"  在spring2.0以后支持,改一下配置文件即可

spring的XML配置文件的这个:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">

改成这个就可以了:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
    "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

 

 

posted @ 2014-04-19 23:36  JUSTINGDOIT  阅读(489)  评论(0编辑  收藏  举报