How to process a form login using Spring Security / Spring MVC

前端 未结 6 1462
暗喜
暗喜 2020-12-13 00:59

Simple question, I just need a pointer in the right direction:

I have a simple Spring MVC/Spring Security webapp. Initially I set up Spring Security so that the defa

6条回答
  •  忘掉有多难
    2020-12-13 01:36

    If you're using a JDBC accessible database, then you could use the following authentication-provider and avoid creating a custom one. It cuts down the code required to 9 lines of XML:

    
        
    
    

    You can then setup your dataSource as follows

    
        
        
        
        
    
    

    Have a look at this post: http://codehustler.org/blog/spring-security-tutorial-form-login/ It covers everything you need to know about customising Spring Security form-login.

提交回复
热议问题