List of usage examples for org.apache.shiro.web.env ResourceBasedWebEnvironment getConfigLocations
public String[] getConfigLocations()
From source file:org.apache.jena.fuseki.server.ShiroEnvironmentLoader.java
License:Apache License
/** * Normal Shiro initialization only supports one location for an INI file. * //from w w w.ja va 2 s . c om * When given multiple locations for the shiro.ini file, and * if a {@link ResourceBasedWebEnvironment}, check the list of configuration * locations, testing whether the name identified an existing resource. * For the first resource name found to exist, reset the {@link ResourceBasedWebEnvironment} * to name that resource alone so the normal Shiro initialization */ @Override protected void customizeEnvironment(WebEnvironment environment) { if (environment instanceof ResourceBasedWebEnvironment) { ResourceBasedWebEnvironment env = (ResourceBasedWebEnvironment) environment; String[] locations = env.getConfigLocations(); String loc = huntForShiroIni(locations); Fuseki.configLog.info("Shiro file: " + loc); if (loc != null) locations = new String[] { loc }; env.setConfigLocations(locations); } }