此工程结构,主要适用于单体业务向微服务转型时使用,如果已经是服务化的项目,可不按照此修改。

    业务代码规约 - 图1业务代码规约 - 图2

    |-company-module-servic(root)

    |—company-module-service-api(restful接口)

    |—company-module-service-common(通用工具类,常量)

    |—company-module-service-domain(领域/业务逻辑)

    |——company-module-service-domain-dubbo(dubbo接口实现)

    |——company-module-service-domain-domain(逻辑单元)

    |———company-module-service-domain-domain-dto(service相关自定义对象)

    |———company-module-service-domain-domain-service(逻辑单元)

    |———company-module-service-domain-domain-listener(消息/监听)

    |——company-module-service-domain-job(定时任务)

    |——company-module-service-domain-process(业务实现)

    |—company-module-service-facade(对外服务接口)

    |—company-module-service-integration-dal(Db操作层)

    |——company-module-service-integration-ienum(数据库字段枚举)

    |——company-module-service-integration-mapper(mapper/自定义sql)

    |——company-module-service-integration-repository(sql增删改查,缓存层)

    |—company-module-service-remote(远程调用层)

    |—company-module-service-test(测试)

    画板

    业务代码规约 - 图4