Home > Back-end > Inquire of Spring Security for the custom user information, master
Inquire of Spring Security for the custom user information, master
Time:10-02
As shown above, I first through loadUserByUsername method returns a custom populated UserDetails object, this object contains the organization department, the extra information such as user ID; I think in the controller through Authentication object to get the information how to obtain, directly casts no, below
CodePudding user response:
The authentication directly. GetPricipal equivalent userdetail