Hi! I have project(1) wich include config starter project(2). I need to read application.yml from(1) to (2) to get properties and then create bean to configure service. When I work in IDE it work perfectly but after building jar it show me this error: nested exception is java.io.FileNotFoundException: URL [jar:file:/X:/xxxx.jar!/BOOT-INF/classes!/application.yml] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/X:/xxxx.jar!/BOOT-INF/classes!/application.yml here code (getResources("classpath:application.yaml"), getResources("classpath:application.yml"));
Comment From: wilkinsona
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
Comment From: VSVDEv
I searched but did not find it, therefore I decided to contact you. And this code don't find application.yml System.getProperties().forEach((key, value) -> System.out.println(key + " " + value + " "));
Comment From: wilkinsona
This existing Q&A may help.
And this code don't find application.yml
System.getProperties().forEach((key, value) -> System.out.println(key + " " + value + " "));
That is to be expected as there's no relationship between system properties and application.yml
. As I said above, this really belongs on Stack Overflow as we prefer to use the issue tracker for bugs and enhancements.
Comment From: VSVDEv
Thank for you help. I solve my problem using InputStream, but I think it would be much better if there was a standard method.