1. 新增一个业务模块,统一将业务模块放在hc-modeules下
  2. 在resources资源目录下新增application-properties.yml文件  该文件用来配置注册中心、配置中心信息等..
  3. 在pom.xml文件添加jar包的依赖以及配置指向的父级
  4.     <parent>
    		<groupId>com.github.pig</groupId>
    		<artifactId>pig-modules</artifactId>
    		<version>1.3.1</version>
    	</parent>

     

  5. 同时在父工程的pom.xml里加入子工程
  6.     <modules>
            <module>pig-daemon-service</module>
            <module>pig-mc-service</module>
            <module>pig-sso-client-demo</module>
            <module>pig-upms-service</module>
        </modules>

     

  7. 添加main启动类,扫描其他需要引入的公共模块
  8. 新增服务网关访问路径
  9. 在你的配置仓库新增工程的配置文件,文件命名的规则{application.name}-{profiles.active}.yml,hc-upms-service-dev.yml

 

 

Spring cloud:分布式module
组成

 项目架构

相关文章:

  • 2021-05-20
  • 2021-04-05
  • 2021-10-23
  • 2021-09-14
  • 2022-12-23
  • 2021-06-04
  • 2021-08-04
  • 2021-04-02
猜你喜欢
  • 2021-07-09
  • 2021-12-28
  • 2021-08-15
  • 2021-04-25
  • 2021-08-25
  • 2021-12-04
  • 2021-05-29
相关资源
相似解决方案