get logged-in user in Spring boot

‮al.www‬utturi.com
get logged-in user in Spring boot
// get Authentication Context
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();

// Get user name
authentication.getName()
Created Time:2017-09-06 22:38:02  Author:lautturi