I am trying to apply security in my spring application using database tables.
What I have so far in my applicationContext-Security is:
All dependencies of Spring Security (such as your DAO) should be decalred in the root web application context (applicationContext.xml
or other XML files configured in
named contextConfigLocation
), not in serlvlet's conext (...-servlet.xml
), because core Spring Security beans are declared in the root context, and beans in that context don't have access to beans in the servlet's context.
If you use
, you can follow this solution.
See also: