Then the last chapter goes: http://www.cnblogs.com/sxdcgaq8080/p/7712874.html
Package The Spring boot project created in the previous chapter into a jar package and a war package
"The difference between the jar and the war is that the value in the:<packaging> tag is changed to the line like"
=============================================================================================================== ======================
All right, here's the jar bag.
Using MAVEN's plug-in package
The package is now packaged with the default name of the jar package. Then run the jar package from the command line. Of course, the jar package name you need to go to the above target path to copy down. "Not very troublesome!!" 】
Then visit the JSP page, because I added the method of printing, you can see in the
However, the page cannot be accessed:
Then go to the jar package to see, because the jar package does not have the WebApp page file, etc., of course, the visit cannot find the page "If you want the jar package can also be packaged webapp under the page, you can: http://www.cnblogs.com/ Sxdcgaq8080/p/7715427.html "
Well, since the package is not successfully accessed, pack the war package: just change the jar to a war.
"Note: If you do not want to copy the jar name, the name of the package is customized, under build can be specified"
Packaged into a war package
See if the name of the packaged war package is customized.
Then run the war package again
This can be accessed.
Look at the war package, the page file has been packaged in.
=============================================================================================================== ========================
All right, pack up for a while, just take the above war bag and put it in an external tomcat. Try it:
The "Spring Boot" 6.idea springboot is packaged into jar packages and war packages and can be run under external tomcat to access the