Can't create CSRF token with Spring Security

前端 未结 6 1347
清酒与你
清酒与你 2020-12-29 10:26

I am using Spring Security 3.2.3 in my Spring MVC application and getting some unexpected behavior.

According to the documentation here, it should be possible to us

6条回答
  •  甜味超标
    2020-12-29 11:12

    Your issue is a different one, just stumbled across this one as well and it took me several hours to figure out the cause. The cause for the issue described by you is that you did not enable csrf support within your spring-security.xml

    This little snippet needs to go into your security-config.xml:

    
    
    
    
    
        
        
    
        
        
        
        
        
        
        
        
        
        
    
        
        
    
        
        
    
    ....
    ...
    ..
    .
    

    Save time by configuring this correctly...

    Cheerio, Flo!

提交回复
热议问题