【发布时间】:2023-03-02 23:33:01
【问题描述】:
我正在尝试基本的 spring 安全设置。我正在使用 3.1.0.RELEASE 我在spring security xml中有如下:
<security:http auto-config='true'>
<security:intercept-url pattern="/**" access="ROLE_USER" />
</security:http>
<security:authentication-manager>
<security:authentication-provider>
<security:user-service>
<security:user name="jimi" password="jimispassword" authorities="ROLE_USER, ROLE_ADMIN" />
<security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
当我访问起始页时,我得到以下异常: org.springframework.beans.factory.BeanCreationExce ption:创建名为“org.springframework.security.filterChains”的bean时出错:bean初始化失败;嵌套异常是 java.lang.NoSuchFieldError: NULL。
谁能帮帮我?
【问题讨论】:
-
org.springframework.beans.factory.BeanCreationException:创建名为“org.springframework.security.filterChains”的bean时出错:bean初始化失败;嵌套异常是 java.lang.NoSuchFieldError: NULL at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
-
******************************web xml***********
contextConfigLocation /WEB-INF/applicationContext-security.xml springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy springSecurityFilterChain /* -
欢迎来到 Stackoverflow。一个提示:您可以编辑问题,而不是添加命令,这将使其更具可读性。