Skip to content

Commit

Permalink
bugfix(#45),use currentThread classLoader find resource again when fi…
Browse files Browse the repository at this point in the history
…le not found (#46)
  • Loading branch information
tomsun28 authored Jan 3, 2021
1 parent 7548b84 commit 24fc347
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class DocumentResourceAccess {
public static DocumentResourceEntity loadConfig() throws IOException {
Yaml yaml = new Yaml();
InputStream inputStream = DocumentResourceAccess.class.getClassLoader().getResourceAsStream(yamlFileName);
if (inputStream == null) {
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(yamlFileName);
}
if (inputStream == null) {
File yamlFile = new File(yamlFileName);
if (yamlFile.exists()) {
Expand Down

0 comments on commit 24fc347

Please sign in to comment.