Idea creates a multiple module aggregation project based on Springboot and generates a war package _idea

Source: Internet
Author: User

Background: Recently, the company is doing a scenic spot management system based on Springboot, the project will have all the functions to do a project, now the customer needs to put the front desk ticketing and background management deployed to two domain names, I am responsible for splitting the project, decided to use idea to create two project, The service and entity, DAO are divided into a common module, two projects are referenced, toss after the project can run but MAVEN packaging has been wrong;
And then I checked the data. This situation requires the use of MAVEN poly-Modular aggregation, that is, project is empty, the service is also module,module interdependence between the services is the jar package, the front desk service is the war package way;
Briefly describe the steps:

To create a MAVEN project:

Right-click the module for the new service in the project folder, because the Springboot project needs to select Spring

Create a module for the front desk ticketing service, pay attention to the package mode war, which is a service that needs to be deployed to Tomcat

Introducing module in Project's Pom file

Front Desk Ticket module relies on service module to configure dependencies in the Pom file

To package, to be packaged in a parent project:
Step on the pit.

All module base package names are the same, different will error, cannot find the class,
Delete the default startup class for non-serviced module

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.