Attribute "scope" must be declared for element type "bean". 异常解决办法

转载 2018年04月16日 11:18:37

之前开发工具使用的是myeclipse,今天换成eclipse后spring.xml文件全部变成这样了.. 



强迫症的我是不允许的.. 查了一下原因,因为 "scope" 在spring2.0以后支持,所以把配置文件中的

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

换成

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

就可以了。

参考自:https://blog.csdn.net/zi_jun/article/details/8271256


scope" must be declared for element type "bean"异常

今天把spring配置增加scope,但是启动异常,报,org.xml.sax.SAXParseException: Attribute "scope" must be declared for el...
  • zi_jun
  • zi_jun
  • 2012-12-07 23:26:36
  • 1993

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

今天在做spring测试的时候,发现这个错误:      [java] Caused by: org.xml.sax.SAXParseException: Attribute "scope" m...
  • lqclh502
  • lqclh502
  • 2012-09-27 14:04:48
  • 5479

Attribute "scope" must be declared for element type "bean"

使用的是 方式查看dtd发现定义里应该写而不是
  • lsj19830812
  • lsj19830812
  • 2010-07-28 16:09:00
  • 4657

Attribute "column" must be declared for element type "property"解决办法

Attribute "column" must be declared for element type "property"解决办法  hibernate,自己写的xxx.hbm....
  • zpwangshisuifeng
  • zpwangshisuifeng
  • 2017-03-12 12:53:18
  • 427

“scope” must be declared for element type “bean”异常

查了一下发现是原来Attribute "scope"  在spring2.0以后支持啊~~   spring的XML配置文件的这个:          "http://www.sprin...
  • ziyouniao719672119
  • ziyouniao719672119
  • 2016-05-04 11:02:26
  • 135

Attribute "resultClass" must be declared for element type "insert".

iBatis,在SQL映射xml中的insert元素中写了resultClass属性,例如: insert id="putUser" parameterClass="domain.User" r...
  • jiuai455
  • jiuai455
  • 2013-02-23 19:39:36
  • 1576

Attribute "nameSpace" must be declared for element type "sqlMap".

在学习ibatis的时候遇到的异常你可能写了多个orm配置文件,每个配置文件里都进行一些CRUD之类的操作,难免会遇到两个或者多个配置文件中的都有一个statement的id命名为 find***, ...
  • xiao_cs
  • xiao_cs
  • 2009-09-15 16:10:00
  • 9668

Attribute "resultCalss" must be declared for element type "select".

Caused by: org.xml.sax.SAXParseException: Attribute "resultCalss" must be declared for element type ...
  • z278718149
  • z278718149
  • 2015-08-24 17:11:50
  • 2490

Attribute "resource" must be declared for element type "mapper".

Mybatis项目配置别名配置文件时遇到的问题遇到如下问题:Attribute "resource" must be declared for element type "mapper". 解决方案:...
  • u012129885
  • u012129885
  • 2016-06-13 15:17:10
  • 4308

Attribute "statementType" must be declared for element type "procedure"

struts2框架,持久层使用ibatis,出现以下错误: Attribute "statementType" must be declared for element type "procedure...
  • u010009900
  • u010009900
  • 2014-01-06 10:05:27
  • 2346
收藏助手
不良信息举报
您举报文章:Attribute &quot;scope&quot; must be declared for element type &quot;bean&quot;. 异常解决办法
举报原因:
原因补充:

(最多只允许输入30个字)