An Authentication object was not found in the SecurityContext - Spring 3.2.2

后端 未结 6 1049
灰色年华
灰色年华 2020-12-03 04:26

I\'m trying to invoke a protected method from a class that implements the ApplicationListener interface on successful login (S

6条回答
  •  清歌不尽
    2020-12-03 05:04

    There is similar issue. I added listener as given here

    https://stackoverflow.com/questions/3145936/spring-security-j-spring-security-logout-problem

    It worked for me adding below lines to web.xml. Posting it very late, should help someone looking for answer.

    
         org.springframework.security.web.session.HttpSessionEventPublisher
    
    

提交回复
热议问题