Skip to content

Commit

Permalink
修改 product-service-app 的 dev 的注册中心的配置
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Aug 2, 2020
1 parent d970591 commit 72ed490
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
19 changes: 19 additions & 0 deletions product-service-project/product-service-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<artifactId>product-service-api</artifactId>
</dependency>

<!-- Web 相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <!-- 需要开启 Web 容器,因为 Actuator 需要使用到 -->
</dependency>

<!-- MQ 相关 -->
<dependency>
<groupId>cn.iocoder.mall</groupId>
Expand Down Expand Up @@ -58,6 +64,12 @@
<artifactId>mall-spring-boot-starter-mybatis</artifactId>
</dependency>

<!-- 监控相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<!-- 工具类相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -88,6 +100,13 @@
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<!-- 使用 spring-boot-maven-plugin 插件打包 -->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ spring:
dubbo:
# Dubbo 注册中心
registry:
address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ rocketmq:
producer:
group: ${spring.application.name}-producer-group

# Actuator 监控配置项
management:
server.port: 38082 # 独立端口,避免被暴露出去
endpoints.web.exposure.include: '*' # 暴露所有监控端点
server.port: ${management.server.port} # 设置使用 Actuator 的服务器端口,因为 RPC 服务不需要 Web 端口

# Mall 配置项
mall:
# 错误码配置项对应 ErrorCodeProperties 配置类
Expand Down

0 comments on commit 72ed490

Please sign in to comment.