Sping异常01

来源:互联网 发布:php富文本编辑器 编辑:程序博客网 时间:2024/04/30 09:02

 org.springframework.beans.factory.xml.XmlBeanDefinitionS

toreException

异常描述:

Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 39 in XML document from class path resource [bean.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'util:property-path'.

原因:

在Spring框架解压缩包的schema\util路径下包含有util:命名空间的XML Schema文件,为了使用util:命名空间的元素,必须在Spring配置文件中导入最新的spring-util-4.0.xsd

解决:

我的编辑环境:Myeclipse 10.0   SpingVersion:3.1

在配置文件的beans标签的xsi:schemaLocation属性值中增加以下两行字符串:

http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.0.xsd

注意:

Sping中注解的应用(启用@AsjectJ支持) ,需配置:

<aop:aspectj-autoproxy />


0 0
原创粉丝点击