Package a spring boot application including JSPs and static resources

前端 未结 5 2097
面向向阳花
面向向阳花 2020-12-29 11:46

I want to package a spring-boot application as jar, and I do so with mvn package.

This produces a jar which does not contain any /WEB-INF/jsp

5条回答
  •  失恋的感觉
    2020-12-29 12:25

    Is there any reason why you can't use the war packaging type? https://maven.apache.org/plugins/maven-war-plugin/usage.html I would recommend to use the war packaging type and use default maven web-application structure.

    If you really want to use the jar plugin for your webapp, you need to configure it for your project. Due to your posting, I don't understand your structure and can't give you an example. Check out the usage of jar plugin here:https://maven.apache.org/plugins/maven-war-plugin/usage.html

提交回复
热议问题