I have one login form for user, and another for admin. I want, that user with ROLE_USER can log in only from user's form, and admin only from admin's form. I think that right solving is to create second implementation of userDetailsService. For this I must create two different dispacher servlets for different paths, But as I understand I must create two different authenticationManagers in two different child contexts(dispatcher servlets). It is right solving? Or say me please right decision for creating admin section in spring. Any help is appreciated)
Two different authenticationManagers for two different dispatcherServlet there is I attempted override authenticationManager in child context, and one user answered me that it is impossible. But as sayed in docs:
In the Web MVC framework, each DispatcherServlet has its own WebApplicationContext, which inherits all the beans already defined in the root WebApplicationContext. The root WebApplicationContext should contain all the infrastructure beans that should be shared between your other contexts and Servlet instances. These inherited beans can be overridden in the servlet-specific scope, and you can define new scope-specific beans local to a given Servlet instance.
I can't understand difference between
overriding bean in child context(it is impossible as user answered me)
and
inherited beans can be overridden in the servlet-specific scope
Please explain me this)