Hi guys,
I've just upgraded from Spring Security 3.0.0.M2 to 3.0.0.RC1, and now my security filter bean fails. I've set it up like this:
This used to work fine, but now I getCode:<security:http auto-config="true"> <security:http-basic/> <security:intercept-url pattern="/public" filters="none"/> <security:intercept-url pattern="/private/**" access="ROLE_ADMIN,ROLE_USER" /> <security:intercept-url pattern="/admin/**" access="ROLE_ADMIN" /> <security:port-mappings> <security:port-mapping http="8080" https="8443"/> </security:port-mappings> <security:intercept-url pattern="/url1**" access="ROLE_ROLE1" requires-channel="https"/> </security:http>
Before that, I've defined my authenticationmanager:Code:SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.config.authentication.AuthenticationManagerFactoryBean] while setting bean property 'parent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#4': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.security.authenticationManager' is defined: Did you forget to add an <authentication-manager> element to your configuration (with child <authentication-provider> elements) ? at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1299) ....
This worked fine with M2 and authenticated my users, but now I get the exception above. Any suggestions? Has anything changed? Did I omit something that now came back to haunt me?Code:<bean id="userService" parent="txProxyTemplate"> <property name="target"> <bean class="tld.mydomain.business.UserServiceImpl"/> </property> <property name="proxyInterfaces" value="tld.mydomain.business.UserService"/> </bean> <bean id="_authenticationManager" class="org.springframework.security.authentication.ProviderManager"> <property name="providers"> <list> <bean class="org.springframework.security.authentication.dao.DaoAuthenticationProvider"> <property name="userDetailsService" ref="userService"/> <property name="passwordEncoder"> <bean class="org.springframework.security.authentication.encoding.PlaintextPasswordEncoder" /> </property> </bean> </list> </property> </bean>
Cheers
Nik



