SpringBoot2.0部署war项目到tomcat9和启动原理讲解
二十二 22
1、SpringBoot启动方式讲解和部署war项目到tomcat9
简介:SpringBoot常见启动方式讲解和部署war项目Tomcat
1、ide启动
2、jar包方式启动
maven插件:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
如果没有加,则执行jar包 ,报错如下
java -jar spring-boot-demo-0.0.1-SNAPSHOT.jar
no main manifest attribute, in spring-boot-demo-0.0.1-SNAPSHOT.jar
如果有安装maven 用 mvn spring-boot:run
项目结构
example.jar
|
+-META-INF
| +-MANIFEST.MF
+-org
| +-springframework
| +-boot
| +-loader
| +-<spring boot loader classes>
+-BOOT-INF
+-classes
| +-mycompany
| +-project
|