测试Spring整合hibernate、Struts2框架时,配置文件报错,看不懂

图片说明

报错:



Caused by: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 44; cvc-complex-type.2.4.a: 发现了以元素 'property' 开头的无效内容。

应以 '{"http://www.springframework.org/schema/beans":import,

"http://www.springframework.org/schema/beans":alias,

"http://www.springframework.org/schema/beans":bean,

WC[##other:"http://www.springframework.org/schema/beans"]}' 之一开头。

不应该包含在bean里边么,你那上边的bean是个单标签啊

配置的位置不对,property是bean的子属性,需要包含在bean标签内

下面的property应该是包含在datasource bean里面的,是该bean的属性。并且在前面配置datasource时不是用了p标签么,可以接着用这个的,不用写property。

bean标签错了,property 包含在bean标签内,这代码写的真是奇葩,要么不要property,用还用一半,URL,name,password 不写property里面