Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/139.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 安全命名空间不支持元素[自定义筛选器]的修饰_Xml_Spring_Spring Mvc_Spring Security - Fatal编程技术网

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
元素内部,而不是作为根元素,