Xml 安全命名空间不支持元素[自定义筛选器]的修饰
我需要执行自定义授权,因此我预先确定了Xml 安全命名空间不支持元素[自定义筛选器]的修饰,xml,spring,spring-mvc,spring-security,Xml,Spring,Spring Mvc,Spring Security,我需要执行自定义授权,因此我预先确定了AuthenticationManager和loginuraluthenticationentrypoint,并将其设置为usernamespasswordauthenticationfilter 这是我的spring security.xml: 这两个类(CustomAuthenticationEntryPoint扩展了LoginUrlAuthenticationEntryPoint和CustomAuthenticationManager实现Authe
AuthenticationManager
和loginuraluthenticationentrypoint
,并将其设置为usernamespasswordauthenticationfilter
这是我的spring security.xml
:
这两个类(CustomAuthenticationEntryPoint扩展了LoginUrlAuthenticationEntryPoint
和CustomAuthenticationManager实现AuthenticationManager
)都已实现,但这将是太多的代码示例(我认为它们不会导致问题)
我得到以下错误:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Security namespace does not support decoration of element [custom-filter]
Offending resource: ServletContext resource [/WEB-INF/spring-security.xml]
我使用Spring Security 3.2.3,并且
Spring-Security-3.2.xsd中存在custom filter
标记。请告诉我我的安全配置中有什么不正确。您的配置无效,请参阅:
41.1.19
此元素用于将过滤器添加到过滤器链。它不创建任何附加bean,但用于选择类型为javax.servlet.Filter
的bean,该bean已在应用程序上下文中定义,并将其添加到由Spring Security维护的过滤器链中的特定位置。完整的详细信息可以在名称空间一章中找到
的父元素
- http
您修改的
配置:
需要进入安全性:http
元素内部,而不是作为根元素,