我试图将 Spring 安全性集成到我现有的项目中。我使用的工具是:
- 春天 2.5.6.SEC03
- 弹簧安全核心 3.1.1.RELEASE
- 7.
在弹簧配置中,我有这个:
<beans:beans xmlns="http://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="/messagePost.htm*" access="ROLE_USER"/>
</http>
<authentication-provider>
<user-service>
<user name="user1" password="1111" authorities="ROLE_USER"/>
</user-service>
</authentication-provider>
</beans:beans>
但是这个spring配置有一个错误:
- cvc-complex-type.2.4.c:匹配通配符是严格的,但找不到元素“authentication-provider”的声明。
- cvc-complex-type.2.4.c:匹配通配符是严格的,但找不到元素“http”的声明。
我可以知道如何解决这个问题吗?