Home  >  Article  >  Java  >  Introduction to the method of packaging war in java (with code)

Introduction to the method of packaging war in java (with code)

不言
不言forward
2019-03-29 11:09:104022browse

This article brings you an introduction to the method of packaging war in Java (with code). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. Maven project

war package deployment requirements are as follows:

<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>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <scope>provided</scope>
    </dependency>

2.java web project

Just right-click the project and export war

This article has ended here. For more other exciting content, you can pay attention to the Java Video Tutorial column of the PHP Chinese website!

The above is the detailed content of Introduction to the method of packaging war in java (with code). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete