diff --git a/product-service-project/product-service-app/pom.xml b/product-service-project/product-service-app/pom.xml
index 3e34d8f19..e91aec96f 100644
--- a/product-service-project/product-service-app/pom.xml
+++ b/product-service-project/product-service-app/pom.xml
@@ -30,6 +30,12 @@
product-service-api
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
cn.iocoder.mall
@@ -58,6 +64,12 @@
mall-spring-boot-starter-mybatis
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
org.springframework.boot
@@ -88,6 +100,13 @@
${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
diff --git a/product-service-project/product-service-app/src/main/resources/application-dev.yaml b/product-service-project/product-service-app/src/main/resources/application-dev.yaml
index 10c3b0e7b..dea36f740 100644
--- a/product-service-project/product-service-app/src/main/resources/application-dev.yaml
+++ b/product-service-project/product-service-app/src/main/resources/application-dev.yaml
@@ -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 服务注册中心的地址
diff --git a/product-service-project/product-service-app/src/main/resources/application.yaml b/product-service-project/product-service-app/src/main/resources/application.yaml
index 3caf2f162..e169a0bfa 100644
--- a/product-service-project/product-service-app/src/main/resources/application.yaml
+++ b/product-service-project/product-service-app/src/main/resources/application.yaml
@@ -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 配置类