SpringCloud microservice development is regulated by our company

Due to the prevalence of microservices in the market, in general, there are many problems with maven versioning between modules, as well as versioning of springBoot and SpringCloud.

** Our company is increasingly finding the importance of version control in the use of SpringCloud. In order to unify the specifications, I optimized a set of SpringCloud development specifications belonging to our company based on Nexus. 支那

First look at the project architecture:

Details of each module:

Each module is divided into API package and service package and aggregated by the outermost POM file

Ex. :

Code for the company’s nexus private warehouse address

Let’s talk about the API and Service packages

API package: provides uniform external callback and feign calls before each module

The bean package is the unified external callback entity, and the API package is the feIGN interface provided externally

Service package: The service package is the normal business code

Next we introduce previous dependencies for each module:

API package:

Sercie package:

Benefits:

Unified dependency management, no longer dependency conflicts or version mismatch problem, the introduction of common methods and unified scaffolding through jar packages, also improved the standardization of the code. Don’t spray (dog head save life), interested in the next issue will be about our company’s use of Mybatis-Plus.