Howtolayouttheprojectstructureinadistributedsystem,partII

编程

1 Access Layer

1.1 Overview

Layout

Description

Base Package

Base url

User background

用户后台接入层

com.xtwj.dragon.api.user

http://127.0.0.1:18000:/api

Enterprise background

企业后台接入层

com.xtwj.dragon.api.ent

http://127.0.0.1:18001:/api

Operation background

运营应用接入层

com.xtwj.dragon.api.ops

http://127.0.0.1:18002:/api

1.2 Resources Map

Resources

Description

url

Handle

Input

Output

Order

订单

/orders

OrderController

OrderAI

OrderAO

Role

角色

/roles

RoleController

RoleAI

RoleAO

1.3 Package layout

Item

package

Description

OrderController

controller

OrderAI

ai

-

OrderAO

ao

-

1.4 Layer Associate

Item

Layer

Associate

Input

Output

Description

OrderController

Service

OrderService

OrderSI

OrderSO

-

OrderController

Service

UserService

UserSI

UserSO

-

OrderController

Service

CommodityService

CommoditySI

CommoditySO

-

OrderController

Service

LogisticsService

LogisticsSI

LogisticsSO

-

2 Service Layer

2.1 Overview

Element

Interface

Implement

Input

Output

Base Package

Description

Order

OrderService

OrderServiceImpl

OrderSI

OrderSO

com.xtwj.dragon.service

订单

2.2 Package layout

Item

package

Description

OrderService

spec

-

OrderServiceImpl

impl

-

OrderSI

si

-

OrderSO

so

-

2.3 Layer Associate

Item

Layer

Associate

Input

Output

Description

OrderServiceImpl

Business

OrderBusiness

OrderBI

OrderBO

-

3 Business Layer

3.1 Overview

Element

Interface

Implement

Input

Output

Base Package

Description

Order

OrderBusiness

OrderBusinessImpl

OrderBI

OrderBO

com.xtwj.dragon.business

订单

3.2 Package layout

Item

package

Description

OrderBusiness

spec

-

OrderBusinessImpl

impl

-

OrderBI

bi

-

OrderBO

bo

-

3.3 Layer Associate

Item

Layer

Associate

Input

Output

Description

OrderServiceImpl

Repository

OrderRepository

OrderDI

OrderDO

-

4 Repository Layer

3.1 Overview

Element

Interface

Implement

Input

Output

Base Package

Description

Order

OrderRepository

-

OrderRI

OrderRO

com.xtwj.dragon.service

订单

3.2 Package layout

Item

package

Description

OrderRepository

spec

-

OrderRI

ri

-

OrderRO

ro

-

以上是 Howtolayouttheprojectstructureinadistributedsystem,partII 的全部内容, 来源链接: utcz.com/z/515497.html

回到顶部