Spring Security Login Page

前端 未结 2 853
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 22:45

I developed an application that uses Spring Security\'s default login page. However I want to implement my own login page. I will put a login.html instead of a jsp page. I w

2条回答
  •  被撕碎了的回忆
    2020-11-30 23:27

    I have been working for a couple of days on implementing spring security in my project and the configuration that finally did it was the following:

    spring-security.xml

    
    
        
        
        
    
    
    
        
            
        
    
    

    spring-config.xml

    
    
    
    
    
    
        
        
        
        
    
    
    
    
    
        
    
    

    web.xml

    
        index.html
    
    
    
        contextConfigLocation
        
            /WEB-INF/spring-config.xml
            /WEB-INF/spring-security.xml
        
    
    
    
        org.springframework.web.context.request.RequestContextListener
    
    
        org.springframework.web.context.ContextLoaderListener
    
    
    
        dispatcher
        org.springframework.web.servlet.DispatcherServlet
        1
    
    
        dispatcher
        /login
        /
    
    
    
        springSecurityFilterChain
        org.springframework.web.filter.DelegatingFilterProxy
        
            contextAttribute
            org.springframework.web.context.WebApplicationContext.ROOT
        
    
    
        springSecurityFilterChain
        /*
    
    
    
        403
        /403
    
    

    login.html

    
        

    for logout use url - "/{yourAppPathInTheContainer}/j_spring_security_logout"

提交回复
热议问题