Spring Boot Executable jar structure -
Spring Boot Executable jar structure -
i'm trying run spring boot sample application. , added couple of images in "images" folder under webapp folder (same level web-inf).
i created executable jar, , these images displayed correctly on web pages.
but, i'm scratching head images folder in executable jar? these images in 1 of lib jar?
thanks in advance.
update: after trying same jar on machine question changes altogather. now, can confirm images not part of executable "fat" jar, images not coming on webpages. going further, none of files under "webapp" packaged in jar. have set spring-boot-maven-plugin plugin in pom , using "mvn package" create jar. in src project, webapp under src/main (same level java , resource).
this covered in documentation static resources:
do not utilize src/main/webapp
folder if application packaged jar. although folder mutual standard, work war packaging , silently ignored build tools if generate jar.
you should place static resources in src/main/resources
instead.
spring jar structure executable spring-boot
Comments
Post a Comment