我对 Spring Security 有疑问。Eclipse 在 spring-security.xml 中找不到 html 标记并出现此错误:
Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 28; cvc-complex-type.2.4.c :
The matching wildcard is strict, but no declaration can be found for element 'http'
这是xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd
">
<http auto-config='true'>
<intercept-url pattern="/**" access="ROLE_USER"/>
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="user1" password="1111" authorities="ROLE_USER"/>
</user-service>
</authentication-provider>
</authentication-manager>
</beans:beans>
问题出在第一个标签 html 上,但我找不到 xsd 配置的任何问题。
有任何想法吗 ?
非常感谢。