@SneakyThrows
    public void loadShiroConfiguration(final Resource resource) {
        val shiroResource = ResourceUtils.prepareClasspathResourceIfNeeded(resource);
        if (shiroResource != null && shiroResource.exists()) {
            val location = shiroResource.getURI().toString();
            LOGGER.debug("Loading Shiro configuration from [{}]", location);
            val factory = new IniSecurityManagerFactory(location);
            val securityManager = factory.getInstance();
            SecurityUtils.setSecurityManager(securityManager);
        } else {
            LOGGER.debug("Shiro configuration is not defined");
        }
    }
@ SneakyThrows public void loadShiroConfiguration ( final Resource resource ) { val shiroResource = ResourceUtils . prepareClasspathResourceIfNeeded ( resource ) ; if ( shiroResource != null && shiroResource . exists ( ) ) { val location = shiroResource . getURI ( ) . toString ( ) ; LOGGER . debug ( "Loading Shiro configuration from [{}]" , location ) ; val factory = new IniSecurityManagerFactory ( location ) ; val securityManager = factory . getInstance ( ) ; SecurityUtils . setSecurityManager ( securityManager ) ; } else { LOGGER . debug ( "Shiro configuration is not defined" ) ; } }
Sets shiro configuration to the path of the resource
that points to the {@code shiro.ini} file.

@param resource the resource