How can I use Spring Security without sessions?

前端 未结 7 1474
执念已碎
执念已碎 2020-11-29 15:53

I am building a web application with Spring Security that will live on Amazon EC2 and use Amazon\'s Elastic Load Balancers. Unfortunately, ELB does not support sticky sessio

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 16:18

    It seems to be even easier in Spring Securitiy 3.0. If you're using namespace configuration, you can simply do as follows:

    
      
    
    

    Or you could configure the SecurityContextRepository as null, and nothing would ever get saved that way as well.

提交回复
热议问题