Weird Spring Boot Behavior

Encountered a weird behavior when running my Spring Boot + JSF (PrimeFaces) application in Docker container (using java -jar xxx.jar as ENTRYPOINT). It keep complaining “xhtml Not Found in ExternalContext as a Resource” when I access the page, in fact that runs well either using java -jar command or mvn spring:run in host machine.

After some hard time,  manage to figure out why…….. phew….
… it was caused by wrong jar packaging structure, and correct structure should look as below:

Credit to BalusC @ stackoverflow

 

dicksonkho

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.