I'm using Spring Boot
, and I want to show inside my navbar
the name and surname of the logged user.
To do that I have to call the principal inside every method of each controller and then I have to add the information to the model.
I think there is a better way to do that. I think about the session attribute
. Is it correct?
So my question is: Is the session attribute the best choice? If yes How can I do it?