I have the problem that my spring boot JSF application works in IntelliJ but not as an executable JAR. The application starts up without a problem, but it can not resolve the xhtml templates. In IntelliJ everything works as expected.
I found this question regarding a similar problem. I oriented at the file structure and can not see any difference.
Spring Boot JSF packaging as a JAR
My maven file structure:
src
| main
| resources
| META-INF
| resources
| index.xhtml
| faces-config.xml
So when I start the Spring Boot application it will pick up at target/classes
The structure there is:
target
| classes
| META-INF
| resources
| index.xhtml
| faces-config.xml
In the created executable JAR the structure is
org
BOOT-INF
| lib
| classes
| de ...
META-INF
| resources
| index.xhtml
| faces-config.xml
As far as I understand various sites and answers, this should be the correct structure in the jar to pick up the xhtml files. But it does not work for me. I copied out of desperation the META-INF directory into the BOOT-INF/classes directory and in another iteration just the resources directory from META-INFO into BOOT-INF/classes. But nothing works. It can still not resolve the xhtml files.
How should be the structure of my jar file?