Method 'setProviders' is marked deprecated in Spring Security 3.2.7 -
i using spring security 3.2.7 , got warning in spring configuration
multiple annotations found @ line: - method 'setproviders' marked deprecated
security-config.xml:
<security:http auto-config="true"> <security:intercept-url pattern="/**" /> <security:form-login login-page="/login**" default-target-url="/dashboard**" authentication-failure-url="/login.xhtml?failed=true"/> <security:logout logout-url="/logout" logout-success-url="/login.xhtml"/> </security:http> <bean id="userdao" class="com.tds.erp.dao.impl.userdaoimpl" autowire="default" /> <bean id="userdetailsservice" class="com.tds.erp.services.impl.userdetailserviceimpl"> <property name="userdao" ref="userdao"></property> </bean> <bean id="daoauthenticationprovider" class="org.springframework.security.authentication.dao.daoauthenticationprovider"> <property name="userdetailsservice" ref="userdetailsservice" ></property> </bean> <bean id="authenticationmanager" class="org.springframework.security.authentication.providermanager"> <property name="providers"> <list> <ref local="daoauthenticationprovider"/> </list> </property> </bean> <security:authentication-manager> <security:authentication-provider user-service-ref="userdetailsservice"> <!-- <security:password-encoder hash="bcrypt"/> --> </security:authentication-provider> </security:authentication-manager> </beans>
try following authentication manager
<bean id="authenticationmanager" class="org.springframework.security.authentication.providermanager"> <constructor-arg ref="daoauthenticationprovider"/> </bean>
Comments
Post a Comment