I need to get current loggedin user's details along entertain session.Is there any poissible to do it in Spring
and hibernate
I am new to spring and hibernate...Help me guys.
I need to get current loggedin user's details along entertain session.Is there any poissible to do it in Spring
and hibernate
I am new to spring and hibernate...Help me guys.
There are serveral ways in which you can accomplish this. In a controller you can inject a
Pricipal
as a parameter.You should also be able to inject the
UserDetails
directly as well. Spring will resolve it for you. YourCustomer
class must implement UserDetailsAs for having all details, you should be able to access the firstname, lastname etc, if you've implemented your own
UserDetailsService
where you return your customUserDetails
(Customer
).