Tag: 春季安全

获取错误org.springframework.beans.factory.NoSuchBeanDefinitionException:没有定义名为“springSecurityFilterChain”的bean

我正在运行使用Spring安全的NTLM,我收到以下错误 org.springframework.beans.factory.NoSuchBeanDefinitionException:没有定义名为“springSecurityFilterChain”的bean 我怎样才能解决这个错误? 我有以下在web.xml中定义 <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> 更新1 我解决了这个错误,现在我正在接受 org.springframework.beans.factory.NoSuchBeanDefinitionException:没有定义名为“filterSecurityInterceptor”的bean 我有以下几点 <bean id="springSecurityFilterChain" class="org.acegisecurity.util.FilterChainProxy"> <property name="filterInvocationDefinitionSource"> <value> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /**=httpSessionContextIntegrationFilter, exceptionTranslationFilter, ntlmFilter, filterSecurityInterceptor </value> </property> </bean>` 我改变了我的applicationContext.xml如下,因为像@西恩帕特里克·弗洛伊德提到一些元素是老的,死了,埋没。 不过,我现在有其他错误需要修复:-) 谢谢 <?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:security="http://www.springframework.org/schema/security" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.2.xsd"> <!–<authentication-manager alias="_authenticationManager"></authentication-manager>–> <security:authentication-provider> <security:user-service> <security:user name="testuser" password="PASSWORD" authorities="ROLE_USER, ROLE_ADMIN"/> <security:user […]

春季安全AuthenticationManager与AuthenticationProvider?

有人能告诉我在Spring Security中AuthenticationManager和AuthenticationProvider的区别吗? 他们如何使用,他们如何被称为。 我的理解是一个SecurityFilter会调用AuthenticationManager来authentication一个Authentication对象? 但是AuthenticationProvider在哪里起作用呢? 谢谢!

我怎样才能有所有用户login(通过弹簧安全)我的Web应用程序的列表

我在我的web应用程序中使用spring安全,现在我想要列出所有在我的程序中login的用户。 我怎样才能访问该列表? 他们不是已经在spring的框架内保存了吗? 像SecurityContextHolder或SecurityContextRepository ?

Spring Security在成功login后redirect到上一页

我知道这个问题之前已经被问过了,但是我在这里面临着一个特殊的问题。 我使用弹簧安全3.1.3。 我的Web应用程序中有3个可能的login情况: 通过login页面login:OK。 通过受限页面login:也可以。 通过非限制性页面login:不行…每个人都可以访问“产品”页面,如果用户login,用户可以发表评论。 因此,login表单被包含在同一页面中以允许用户连接。 情况3)的问题是我无法将用户redirect到“产品”页面。 无论如何,他们会在成功login后redirect到主页。 请注意,对于情况2)成功login后,redirect到受限制页面的方式是开箱即用的。 这是我的security.xml文件的相关部分: <!– Authentication policy for the restricted page –> <http use-expressions="true" auto-config="true" pattern="/restrictedPage/**"> <form-login login-page="/login/restrictedLogin" authentication-failure-handler-ref="authenticationFailureHandler" /> <intercept-url pattern="/**" access="isAuthenticated()" /> </http> <!– Authentication policy for every page –> <http use-expressions="true" auto-config="true"> <form-login login-page="/login" authentication-failure-handler-ref="authenticationFailureHandler" /> <logout logout-url="/logout" logout-success-url="/" /> </http> 我怀疑“每个页面的身份validation策略”是对这个问题负责。 但是,如果我删除它,我不能再login… j_spring_security_check发送404错误。 编辑: […]