@PostConstruct
    private void initStaticSecurityManager() {
        SecurityUtils.setSecurityManager(securityManager);
    }
Sets the static instance of SecurityManager. This is NOT needed for web applications.
samples/spring-boot/src/main/java/org/apache/shiro/samples/QuickStart.java