Java web project references java project

Source: Internet
Author: User

Java web project references java project

Most of the current projects of the company use client and service to form a complete project. spring invoke is used for communication between the client and service, this leads to serious redundancy between pojo and service interfaces in two projects, so I plan to refactor the code. Before restructuring, let's take a look at the overall architecture of the project:

Reconstruction process:
1. Create a New java project with any project name, such as common
2. copy the pojo and service interfaces to the new project and delete the original pojo and service interface classes in the client and service. (After completing these two steps, the client and service will have many compilation errors)
3. reference the common project to the client and service respectively.
The procedure is as follows: Right-click the project-Build Path-Configure Build Path-projects and click the Add button to Add the common project. :
Authorization + 38zlsr3W6Mjnz8Kjus/uxL/authorization + 7Ev6Gjz + authorization + DQo8aW1nIGFsdD0 = "here write picture description" src = "http://www.bkjia.com/uploads/allimg/151012/05453JF3-2.png" title = ""/>

At this point, the pojo and service of the project are independent, and only one modification is required at a time. When you deploy a project to a formal environment, directly package the project into a war. The lib directory of the war contains a jar package named by the project name.

Related Article

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.