List of usage examples for org.apache.shiro.io ResourceUtils hasResourcePrefix
@SuppressWarnings({ "UnusedDeclaration" })
public static boolean hasResourcePrefix(String resourcePath)
From source file:org.ehcache.integrations.shiro.EhcacheShiroManager.java
License:Apache License
private URL getResource() throws MalformedURLException { String cacheManagerConfigFile = getCacheManagerConfigFile(); String configFileWithoutPrefix = stripPrefix(cacheManagerConfigFile); if (cacheManagerConfigFile.startsWith(ResourceUtils.CLASSPATH_PREFIX)) { return ClassUtils.getResource(configFileWithoutPrefix); }//from w ww. j a v a2 s . co m String url = ResourceUtils.hasResourcePrefix(cacheManagerConfigFile) ? configFileWithoutPrefix : cacheManagerConfigFile; return new URL(url); }