springboot打war包的pom.xml(打出war包使用的tomcat 9的,低版本可能不行)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0
</modelVersion>
<parent>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-starter-parent
</artifactId>
<version>2.1.3.RELEASE
</version>
<relativePath/>
</parent>
<groupId>com.baizhi
</groupId>
<artifactId>tour-boot
</artifactId>
<version>0.0.1-SNAPSHOT
</version>
<packaging>war
</packaging>
<name>tour-boot
</name>
<description>Demo project for Spring Boot
</description>
<properties>
<java.version>1.8
</java.version>
<druid-version>1.0.16
</druid-version>
<spring-version>5.2.5.RELEASE
</spring-version>
<mybatis-spring-version>1.3.0
</mybatis-spring-version>
<log4j.version>1.2.17
</log4j.version>
<slf4j.version>1.7.25
</slf4j.version>
<jackson-version>2.9.8
</jackson-version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-starter-tomcat
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jstl
</groupId>
<artifactId>jstl
</artifactId>
<version>1.2
</version>
</dependency>
<dependency>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-starter-test
</artifactId>
<scope>test
</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage
</groupId>
<artifactId>junit-vintage-engine
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet
</groupId>
<artifactId>javax.servlet-api
</artifactId>
<version>3.1.0
</version>
<scope>provided
</scope>
</dependency>
<dependency>
<groupId>jstl
</groupId>
<artifactId>jstl
</artifactId>
<version>1.2
</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot
</groupId>
<artifactId>mybatis-spring-boot-starter
</artifactId>
<version>1.3.3
</version>
</dependency>
<dependency>
<groupId>com.alibaba
</groupId>
<artifactId>druid
</artifactId>
<version>${druid-version}
</version>
<scope>compile
</scope>
</dependency>
<dependency>
<groupId>com.oracle
</groupId>
<artifactId>ojdbc6
</artifactId>
<version>12.1.0.1-atlassian-hosted
</version>
</dependency>
<dependency>
<groupId>org.projectlombok
</groupId>
<artifactId>lombok
</artifactId>
<version>1.18.12
</version>
<scope>provided
</scope>
</dependency>
<dependency>
<groupId>commons-codec
</groupId>
<artifactId>commons-codec
</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<groupId>org.testng
</groupId>
<artifactId>testng
</artifactId>
<version>7.3.0
</version>
<scope>test
</scope>
</dependency>
</dependencies>
<build>
<finalName>Tour
</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot
</groupId>
<artifactId>spring-boot-maven-plugin
</artifactId>
<version>1.4.2.RELEASE
</version>
<configuration>
<mainClass>com.baizhi.TourBootApplication
</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>