java – 从元素’global-method-security’开始发现无效内容
在下面的代码我得到一个像这样的错误“cvc-complex-type.2.4.a:从元素’global-method-security’开始发现了无效的内容. ‘{“http://www.springframework.org/schema/beans”:import,“http://www.springframework.org/schema/ beans“:别名,”http://www.springframework.org/schema/beans“:bean,WC [## other:”http:// www.springframework.org/schema/beans“],”http://www.springframework.org/schema/beans“:beans}’是 预期.”
怎么修好呢?
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<context:component-scan base-package="client.security"/>
<global-method-security secured-annotations="enabled" />
</beans>