Springboot Project multi-module packaging and Deployment "POM file Issues"

Source: Internet
Author: User

"The Bean's Pom"

The user's Pom is particularly aware that the user module needs to be added to the web dependency because it has a return JSP page and web-related.

<dependencies>    <!--添加bean模块依赖-->    <dependency>        <groupId>com.yuqiyu</groupId>        <artifactId>bean</artifactId>        <version>1.0.0</version>    </dependency>            <!--     引入web依赖  -->    <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-web</artifactId>    </dependency> </dependencies>    <build>    <plugins>        <plugin>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-maven-plugin</artifactId>            <version>2.3.2</version>        </plugin>    </plugins></build>

"Pager Pom" pager packaging method can not be war, changed to Jar

<groupid>com.yuqiyu</groupid><artifactid>pager</artifactid><version>1.0.0</ Version><packaging>jar</packaging><name>pager</name><description>demo Project For Spring boot</description><parent> <groupId>com.yuqiyu</groupId> <artifactId> Chapter23</artifactid> <version>1.0.0</version></parent><dependencies> <!-- Introducing user Modules-<dependency> <groupId>com.yuqiyu</groupId> <artifactid>user</arti        factid> <version>1.0.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> & Lt;artifactid>spring-boot-maven-plugin</artifactid> <version>2.3.2</version> </p Lugin> </plugins> <finalname>pager</finAlname></build> 

"The main module of Pom" is best not to add sprigboot-starter-parent and Stater-web, the configuration is best in each module to self-adding the necessary matching, to avoid causing conflicts. And the main POM does not add maven-plugin, in the respective modules Add.

Springboot Project multi-module packaging and Deployment "POM file Issues"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.