- byrja-core: 基础组件配置等相关
- byrja-redis:Redis服务相关
- byrja-mq: Mq服务相关
- byrja-services: 业务代码
依赖pom,统一存放方便管理
spring-cloud相关组件的依赖
-
spring-cloud-starter-alibaba-nacos-discovery
-
spring-cloud-starter-alibaba-nacos-config
-
spring-cloud-starter-bootstrap: 读取bootstrap.yml配置
-
spring-cloud-starter-openfeign feign调用。 关于feign
@FeignClient
应该写在哪里:https://blog.csdn.net/kingwinstar/article/details/110280781 https://github.com/lexburner/feign-demo
业务代码模块,这里主要为演示作用
需要打包的service要添加以下插件:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
pom文件要添加以下,否则spring配置文件无法以@xxx@读取到pom文件里的数据:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>