system-service-app 增加 actuator 监控端点
This commit is contained in:
parent
c6c838d759
commit
1daf0dd8cc
@ -9,7 +9,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>system-service-service</artifactId>
|
<artifactId>system-service-app</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- RPC 相关 -->
|
<!-- RPC 相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -28,6 +28,12 @@
|
|||||||
<artifactId>mall-spring-boot-starter-system-error-code</artifactId> <!-- 错误码 -->
|
<artifactId>mall-spring-boot-starter-system-error-code</artifactId> <!-- 错误码 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Web 相关 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId> <!-- 需要开启 Web 容器,因为 Actuator 需要使用到 -->
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Registry 和 Config 相关 -->
|
<!-- Registry 和 Config 相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
@ -50,6 +56,12 @@
|
|||||||
<artifactId>mall-spring-boot-starter-mybatis</artifactId>
|
<artifactId>mall-spring-boot-starter-mybatis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 监控相关 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 工具类相关 -->
|
<!-- 工具类相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
@ -17,4 +17,5 @@ spring:
|
|||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
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 服务注册中心的地址
|
||||||
|
@ -6,6 +6,7 @@ spring:
|
|||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
|
|
||||||
# MyBatis Plus 配置项
|
# MyBatis Plus 配置项
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
@ -59,6 +60,12 @@ dubbo:
|
|||||||
ErrorCodeRpc:
|
ErrorCodeRpc:
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
|
|
||||||
|
# Actuator 监控配置项
|
||||||
|
management:
|
||||||
|
server.port: 38080 # 独立端口,避免被暴露出去
|
||||||
|
endpoints.web.exposure.include: '*' # 暴露所有监控端点
|
||||||
|
server.port: ${management.server.port} # 设置使用 Actuator 的服务器端口,因为 RPC 服务不需要 Web 端口
|
||||||
|
|
||||||
# Mall 配置项
|
# Mall 配置项
|
||||||
mall:
|
mall:
|
||||||
# 错误码配置项对应 ErrorCodeProperties 配置类
|
# 错误码配置项对应 ErrorCodeProperties 配置类
|
||||||
|
Loading…
Reference in New Issue
Block a user