Posted inSpring Boot
How to find the logged-in user in Spring Boot?
Sometimes we require to access logged-in users in different services of the Spring Boot project. Spring Boot which uses Spring Security internally provides a SecurityContextHolder class. This class allows the lookup of the currently…