我有一个 xml 格式的 bean,如下所示
<bean id="theCustomAuthenticationProvider" class="test.custom.CustomAuthenticationProvider">
<security:custom-authentication-provider />
a.may i know what does security:custom-authentication-provider means when i put it in my bean like above?
b。我需要创建
<bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager"> ref to theCustomAuthenticationProvider
在 XML 中?
c。如果 b.答案是肯定的,或者,我可以使用 CustomAuthenticationProviderinside 标签的 ref 吗?
最佳答案
这个想法是标记一个bean:
<security:custom-authentication-provider />
将使用 spring security 提供的 AuthenicationManager
将该 bean 注册为身份验证提供程序。您不需要b。
关于spring - <安全:custom-authentication-provider/> means?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/924436/