Created
June 3, 2017 02:07
-
-
Save bdemers/7acede56023b7f879a1103bc5373a2c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic usage:<p> | |
* <code> | |
* Environment env = new BasicIniEnvironment("classpath:shiro.ini"); | |
* SecurityManager securityManager = env.getSecurityManager(); | |
* </code> | |
* | |
*/ | |
public class BasicIniEnvironment extends DefaultEnvironment { | |
public BasicIniEnvironment(Ini ini) { | |
setSecurityManager(new IniSecurityManagerFactory(ini).getInstance()); | |
} | |
public BasicIniEnvironment(String iniResourcePath) { | |
this(Ini.fromResourcePath(iniResourcePath)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment