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

后端 未结 6 1037
灰色年华
灰色年华 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:12

    This could also happens if you put a @PreAuthorize or @PostAuthorize in a Bean in creation. I would recommend to move such annotations to methods of interest.

提交回复
热议问题