今天在配置spring secutiry3,想让系统先从数据库中保存的权限信息优先于xml中配置的s:intercept-url权限,配置如下:
<beans:bean id="filterSecurityInterceptor"
class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor"
autowire="byType">
<s:custom-filter before="FILTER_SECURITY_INTERCEPTOR" ref=""/>
<beans:property name="objectDefinitionSource" ref="filterInvocationDefinitionSource"/>
</beans:bean>
注意红色的那行,我看网上资料,都没有配置ref的,我不配置ref时tomcat启动时报错:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'ref' must appear on element 's:custom-filter'.
但是如果需要配置的话,这个ref要写什么呢?我随便写,或者写成ref=""则报如下错:
Configuration problem: Security namespace does not support decoration of element [custom-filter]
好纠结啊,请各位帮忙看下,谢谢!
<beans:bean id="filterSecurityInterceptor"
class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor"
autowire="byType">
<s:custom-filter before="FILTER_SECURITY_INTERCEPTOR" ref=""/>
<beans:property name="objectDefinitionSource" ref="filterInvocationDefinitionSource"/>
</beans:bean>
注意红色的那行,我看网上资料,都没有配置ref的,我不配置ref时tomcat启动时报错:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.4: Attribute 'ref' must appear on element 's:custom-filter'.
但是如果需要配置的话,这个ref要写什么呢?我随便写,或者写成ref=""则报如下错:
Configuration problem: Security namespace does not support decoration of element [custom-filter]
好纠结啊,请各位帮忙看下,谢谢!