在使用<http ... />Spring Security 3命名空间时,如何自定义UsernamePasswordAuthenticationFilter usernameParameter(j_username)和passwordParameter(j_password)属性?这是我的理解<http ... />创建过滤器,但我没有看到如何自定义它.
我是春天和春天安全的新手,
我已经理解了如何在xml文件中创建和引用bean,我需要使用spring为我的应用程序提供安全性.
我在web.xml中包含了一个自定义applicationContext-security.xml文件:contextConfigLocation
在这个文件中,我使用截取了url模式
<intercept-url pattern='/**.something' access="IS_AUTHENTICATED_FULLY"/>
Run Code Online (Sandbox Code Playgroud)
内部元素.
我现在已经设置了登录表单,如果页面未经授权,则会显示我的自定义Login.html页面.
现在我面临的问题是:
我试过这个:
<authentication-provider user-service-ref="userDetailsService"/>
<beans:bean id = "userDetailsService" class ="com.somepath.CustomAuthenticationProvider">
<custom-authentication-provider/>
</beans:bean>
Run Code Online (Sandbox Code Playgroud)
其中CustomAuthenticationProvider实现AuthenticationProvider
但代码抛出一个错误:创建名为'_filterChainProxy'的bean时出错....没有UserDetailsService注册
请帮忙