我正在尝试基本的弹簧安全设置.我正在使用3.1.0.RELEASE
我在spring security xml中有如下内容:
ecurity:http auto-config='true'>
ecurity:intercept-url pattern="/**" access="ROLE_USER" />
ecurity:http>
ecurity:authentication-manager>
ecurity:authentication-provider>
ecurity:user-service>
ecurity:user name="jimi" password="jimispassword" authorities="ROLE_USER,ROLE_ADMIN" />
ecurity:user name="bob" password="bobspassword" authorities="ROLE_USER" />
ecurity:user-service>
ecurity:authentication-provider>
ecurity:authentication-manager>
当我访问起始页时,我得到以下异常:
org.springframework.beans.factory.BeanCreationExce ption:创建名为’org.springframework.security.filterChains’的bean时出错:bean的初始化失败;嵌套异常是java.lang.NoSuchFieldError:NULL.
谁能帮我?
最佳答案
这个问题的实际原因似乎是spring-security 3.1.0引入了旧版本的spring,它会产生一种无声的冲突.在我的情况下,spring-security-3.1.0.RELEASE在spring-aop,spring-jdbc,spring-tx和spring-expression 3.0.6中拉,但我使用的是spring 3.1.0.RELEASE.明确地添加这些依赖项后,问题就消失了.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。