Question about SecurityContextHolder from Spring Boot Security
Speaking about Spring Boot RestController... - can I extract a username from SecurityContextHolder only once outside of all methods and then use that string username in any methods as a class scope variable or a constant? Or should the username acquiring be only inside any particular method that has @Secured({"..."}) and mapping annotations? Can the SecurityContextHolder be in a service?