public User getCurrentUser() {
        final Long currentUserId = (Long) SecurityUtils.getSubject().getPrincipal();
        if (currentUserId != null) {
            return getUser(currentUserId);
        } else {
            return null;
        }
    }
Default implementation of the {@link UserService} interface.  This service implements
operations related to User data.
samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/service/DefaultUserService.java