How dow I implement AffirmativeBased object in Spring Security 4? -
in spring 3, constructor looked this:
public affirmativebased(list<accessdecisionvoter> decisionvoters)
in spring 4, constructor adds type:
public affirmativebased(list<accessdecisionvoter<? extends object>> decisionvoters)
can me understand it's looking for?
i facing following exception:
org.springframework.beans.factory.nosuchbeandefinitionexception: no qualifying bean of type [java.util.list] found dependency [java.util.list>]: expected @ least 1 bean qualifies autowire candidate dependency. dependency annotations: {}
i able fix changing property constructor argument.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:sec="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <bean id="accessdecisionmanager" class="org.springframework.security.access.vote.affirmativebased"> <constructor-arg> <util:list> <bean class="org.springframework.security.access.vote.rolevoter"> <property name="roleprefix" value="role_" /> </bean> </util:list> </constructor-arg> </bean> </beans>
Comments
Post a Comment