Spring Boot Executable jar structure

大城市里の小女人 提交于 2019-12-01 23:57:00

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.

Follow the given structure to create fat jar :

Demo
└── src
|    ├── main
|    │   ├── java
|    │   │     └── org
|    │   │          └── demo
|    │   │                └── App.java
|    │   └── resources
|    │       └── application.properties
|    |       |
|    |       └── META-INF
|    |       |        └── resources
|    |       |                 └── jsp
|    |       └── static
|    |              └── css
|    |              └── js
|    |    
|    └── test
|         └── java
|               └── org
|                    └── demo
|                          └── App.java  
├──── pom.xml
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!