我已将 Spring Security 更新到 3.2,以便能够使用基于 Java 的注释来配置项目,而无需 XML。
我几乎配置了所有东西,但有 2 个问题我没有(也不知道如何)配置。
- 如何配置
Http403ForbiddenEntryPoint
? 如何配置我的自定义
AuthenticationManager
?<security:http entry-point-ref="entryPoint" > ... </security:http> <bean id="entryPoint" class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint" /> <security:authentication-manager alias="myAuthenticationManagerImpl" />
这是我的自定义身份验证类:
@Service ("authenticationManager")
public class AuthenticationManagerImpl implements AuthenticationManager {
...
}
最佳答案
显然有一些工作可以解决这个问题,但目前还没有办法通过注释来解决这个问题。这question似乎在寻求相同的答案。作品中的独立项目是 here显然他们会在不久的将来将其合并到 spring security 3.2.X 中。
关于java - Spring Security - 基于 Java 的配置 AuthenticationManager 和 Http403ForbiddenEntryPoint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19883236/