How does maven package a ssh project into a jar

problem description

how does maven package a ssh project into a jar

the environmental background of the problems and what methods you have tried

I directly run package, to package the code with only background logic. Can I package it and include all the webapp in it?

clipboard.png
as shown in the figure above, all of them are packaged into a jar, and then run directly through java-jar. Is it necessary to embed a tomcat??

Mar.29,2021

embedded tomcat depends on the fact that the jar made by springboot-web-starter, can run java-jar, but it cannot be run in an external tomcat. The fact that WebApp is not packaged has nothing to do with the maven configuration, but needs to be changed in the build path of project.


to package a runnable jar package, use SpringBoot; if you want to run it under the application server, use the war package.


type war,war directly or you can use java-jar to execute


spring boot fat jar to learn about

Menu