Maven project: Spring Boot's application.yml is ignored when building Follow
I have a Spring Boot application which fails to run from time to time when I launch it from my IntelliJ IDE. I tracked the problem down to the application.yml file. It's obviously missing during runtime, i.e. it's not available on classpath.
I checked my module's target folder and there I can see, that the file is indeed missing there. Suprisingly, my other config files like application-test.yml don't have that issue and are "compiled" (or better say copied over) normally.
This problem only comes up every few days, persists for a few operations and then suddenly goes away. Running "mvn clean" from the Maven Projects view and building the project (Ctrl + F9) doesn't help also but reproduces the problem.
When I build the project with my external Maven and run the built jar from command line, it just works as normal.
Any idea what could cause this? When I launch my app from an "Spring Boot Run Configuration" does it really use the target folder?
Please sign in to leave a comment.
We have similar issue under investigation: https://youtrack.jetbrains.com/issue/IDEA-193088
Please follow it for updates.