Spring Boot Executable jar structure

前端 未结 2 746
深忆病人
深忆病人 2021-01-14 20:50

I\'m trying to run Spring Boot sample application. And I added couple of images in \"images\" folder under webapp folder (same level as WEB-INF).

I created executabl

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-14 21:22

    This is covered in the documentation about static resources:

    Do not use the src/main/webapp folder if your application will be packaged as a jar. Although this folder is a common standard, it will only work with war packaging and it will be silently ignored by most build tools if you generate a jar.

    You should place your static resources in src/main/resources instead.

提交回复
热议问题