directory
Introduction to Spring Cloud Alibaba (I
Spring Cloud Alibaba (II) Environment construction and NACOS registry configuration center
(3) Build API gateway gateway dynamic routing
So let me show you the project hierarchy
As for building zhC-system project, in order to make it easier to call Feign, I have divided the project into five levels, as follows:
Zhc-system-api -- project open API, And some entity classes (input VO) for feign to call ZHc-system-web -- controller ZHc-system-service -- business layer zhc-system-domain -- Entity classes within the project (PO persistent objects) and Mapper ZH-System-start -- configuration files and startup classes for the projectCopy the code
Do not know VO, PO can take a look at the following, I here in order to not so troublesome only VO, PO
VO, DTO, DO, PO concepts:
VO (View Object) : A View Object used in the presentation layer to encapsulate all data for a given page (or component).
DTO: Data transfer objects, this concept is derived from the J2EE design patterns, the original purpose is to provide coarse-grained distributed applications of EJB data entities, to reduce the number of distributed call, so as to improve the performance of distributed call and reduce the network load, but here, I refer to display data transfer objects between the layer and service layer.
DO (Domain Object) : A Domain Object is a tangible or intangible business entity abstracted from the real world.
Persistent Object (PO) : A Persistent Object that forms a one-to-one mapping relationship with the data structure of the persistence layer (usually a relational database). If the persistence layer is a relational database, each field (or several fields) in the data table corresponds to one (or several) attributes of PO.
Dependencies: Zhc-system-start depends on zhc-system-web zhc-system-web depends on zhc-system-service zhc-system-service dependency ZHC – system – domain, ZHC – system – API
GitHub, Gitee (I was the first to build the project, and then make up the documentation. So the project and the document may be different, please ask me if you have any questions.)