update ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java.
这样香不香?
This commit is contained in:
parent
23b98a3ef8
commit
c958cf5c7c
|
|
@ -149,10 +149,8 @@ public class ShiroConfig
|
|||
protected InputStream getCacheManagerConfigFileInputStream()
|
||||
{
|
||||
String configFile = "classpath:ehcache/ehcache-shiro.xml";
|
||||
InputStream inputStream = null;
|
||||
try
|
||||
try (InputStream inputStream = ResourceUtils.getInputStreamForPath(configFile))
|
||||
{
|
||||
inputStream = ResourceUtils.getInputStreamForPath(configFile);
|
||||
byte[] b = IOUtils.toByteArray(inputStream);
|
||||
InputStream in = new ByteArrayInputStream(b);
|
||||
return in;
|
||||
|
|
@ -162,10 +160,6 @@ public class ShiroConfig
|
|||
throw new ConfigurationException(
|
||||
"Unable to obtain input stream for cacheManagerConfigFile [" + configFile + "]", e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
IOUtils.closeQuietly(inputStream);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue