I am implementing spring security in my project
In my DAO class I am defining the loadUserByUsername
my class is like
UserDAOImpl.java
@
Typically beans that are component scanned are camel-cased starting with a lowercase character so the bean would exist in the application context as userDAOImpl
(not UserDAOImpl
)
change your spring-security.xml
snippet to
<authentication-manager>
<authentication-provider user-service-ref="userDAOImpl">
</authentication-provider>
</authentication-manager>
Hope this works for you.
phew... got it working.
Moved
<context:component-scan base-package="app.com,app.com.controller,app.com.dao,app.com.service,app.com.model"/>
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
p:basename="messages"/>
from dispatcher-servlet to application-context.xml
@Service("userDAOImpl") annotation on class name
Would anyone care to tell why it started working?