From 95e3144f7e96ad3646c1c5b6b1d65b4cd7e54886 Mon Sep 17 00:00:00 2001 From: luoxiang <2806718453@qq.com> Date: Sun, 1 Sep 2019 19:24:35 +0800 Subject: [PATCH] spring-boot-tomcat --- spring-boot/spring-boot-tomcat/README.md | 17 ++++++++++++++++- spring-boot/spring-boot-tomcat/pom.xml | 8 ++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/spring-boot/spring-boot-tomcat/README.md b/spring-boot/spring-boot-tomcat/README.md index f3e4a4c..bd46e45 100644 --- a/spring-boot/spring-boot-tomcat/README.md +++ b/spring-boot/spring-boot-tomcat/README.md @@ -17,10 +17,12 @@ Spring Boot 默认采用内置的 Web 容器,因此打成 JAR 包后就可以直接运行。但在某的时候,你可能还是需要使用 Tomcat 来运行和管理 Web 项目,因此本用例主要介绍 Spring Boot 与 Tomcat 的整合方式。另外 Spring Boot 内置的 Web 容器默认并不支持 JSP,所以可以使用跳转到 JSP 页面的方式来测试整合外部容器是否成功。
- ### 1.2 基本依赖 ```xml + +war + org.springframework.boot spring-boot-starter-web @@ -39,6 +41,19 @@ Spring Boot 默认采用内置的 Web 容器,因此打成 JAR 包后就可以 2.5 provided + + + + + org.apache.maven.plugins + maven-war-plugin + + + false + + + + ``` ## 二、整合 Tomcat diff --git a/spring-boot/spring-boot-tomcat/pom.xml b/spring-boot/spring-boot-tomcat/pom.xml index ea47c91..642991d 100644 --- a/spring-boot/spring-boot-tomcat/pom.xml +++ b/spring-boot/spring-boot-tomcat/pom.xml @@ -13,6 +13,7 @@ 0.0.1-SNAPSHOT spring-boot-tomcat boot-tomcat project for Spring Boot + war 1.8 @@ -57,6 +58,13 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-war-plugin + + false + +