jar 包中获取resource下的文件
String context = null;
InputStream resourceAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("applicationEx.json");
if (resourceAsStream != null) {
context = IOUtils.toString(resourceAsStream);
}
jar 包中获取resource下的文件
String context = null;
InputStream resourceAsStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("applicationEx.json");
if (resourceAsStream != null) {
context = IOUtils.toString(resourceAsStream);
}