spring web, security + web.xml + mvc dispatcher + Bean is created twice

后端 未结 3 470

I have the Web.xml as below:

 
    mvc-dispatcher
    org.springframework.web.se         


        
3条回答
  •  無奈伤痛
    2020-11-30 05:57

    Spring MVC then create a new any-name.xml and place context specific beans like Spring-security.xml and for your security bean to load.

    New xml will be like this

    
    
    
     
      
     
    
     
        
               
                   /WEB-INF/jdbc.properties
               
            
    
    
            
            
            
                        
    
    
    

    and now include this in web.xml

      
       contextConfigLocation
          
          /WEB-INF/login-security.xml,
          /WEB-INF/application-context.xml
       
     
    

    hope this will help you.

提交回复
热议问题