Open raafaar opened 8 years ago
Original error without this fix was:
java.io.FileNotFoundException: class path resource [myroutes.conf] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/home/kawas/code/spring/webapp/target/webapp-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/myroutes.conf
Could you please review this PR ?
The method in this change uses an InputStream instead of a File object.
The use of a method that doesn't depends of a File object, makes possible a deploy into a WebLogic because with WebLogic the configuration files are loaded from a generated jar instead of a file in the filesystem.
The motivation for this change is in this issue: https://github.com/resthub/springmvc-router/issues/68
I've tested myself this change with a simple spring boot project, using «gradle bootRun», delploying into a Tomcat server and into a WebLogic server. The three cases worked as expected.