How to reload Spring Security Principal after updating in Hibernate?

后端 未结 2 545
借酒劲吻你
借酒劲吻你 2020-12-08 19:26

This must be a common issue... and I feel that after googling, and SOing I must have just not looked around thoroughly for the answer enough or that no1 has asked it... so p

2条回答
  •  一向
    一向 (楼主)
    2020-12-08 19:54

    i had the same problem

    i fixed it with getting the authentication from SecurityContextHolder cast it's principal to User then update principal.

    everything is working but i don't know this is a good practice or not.

提交回复
热议问题