Open captSL opened 6 years ago
I have run into the same issue when starting spring boot using java -jar. It appears that running the application this way cannot find files on the classpath using a spring resource getFile method. When the code is changed to use an InputStream, then the file is found
Hi,
in the current version it seems not to be possible to load a metadata file embedded in a JAR, like a packaged Spring Boot application. I get this exception:
java.io.FileNotFoundException: class path resource [saml/idp-meta.xml] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/test/test.jar!/WEB-INF/classes!/saml/idp-meta.xml
For me it looks like the
FilesystemMetadataProvider
being used requires aFile
handle and getting aFile
handle from a JAR is not possible. Instead, anInputStream
should be used.Can anyone confirm this?
Thanks, Thorsten