From 1daf0dd8cc5ec0a33ae247baf587c5337353ba0b Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Sat, 1 Aug 2020 23:19:47 +0800 Subject: [PATCH] =?UTF-8?q?system-service-app=20=E5=A2=9E=E5=8A=A0=20actua?= =?UTF-8?q?tor=20=E7=9B=91=E6=8E=A7=E7=AB=AF=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system-service-project/system-service-app/pom.xml | 14 +++++++++++++- .../src/main/resources/application-dev.yaml | 3 ++- .../src/main/resources/application.yaml | 7 +++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/system-service-project/system-service-app/pom.xml b/system-service-project/system-service-app/pom.xml index 58dafdfc7..08912b0cf 100644 --- a/system-service-project/system-service-app/pom.xml +++ b/system-service-project/system-service-app/pom.xml @@ -9,7 +9,7 @@ 4.0.0 - system-service-service + system-service-app @@ -28,6 +28,12 @@ mall-spring-boot-starter-system-error-code + + + org.springframework.boot + spring-boot-starter-web + + com.alibaba.cloud @@ -50,6 +56,12 @@ mall-spring-boot-starter-mybatis + + + org.springframework.boot + spring-boot-starter-actuator + + org.springframework.boot diff --git a/system-service-project/system-service-app/src/main/resources/application-dev.yaml b/system-service-project/system-service-app/src/main/resources/application-dev.yaml index cfae12b0d..fd03a51f3 100644 --- a/system-service-project/system-service-app/src/main/resources/application-dev.yaml +++ b/system-service-project/system-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/system-service-project/system-service-app/src/main/resources/application.yaml b/system-service-project/system-service-app/src/main/resources/application.yaml index fb911809f..e12bddac5 100644 --- a/system-service-project/system-service-app/src/main/resources/application.yaml +++ b/system-service-project/system-service-app/src/main/resources/application.yaml @@ -6,6 +6,7 @@ spring: profiles: active: local + # MyBatis Plus 配置项 mybatis-plus: configuration: @@ -59,6 +60,12 @@ dubbo: ErrorCodeRpc: version: 1.0.0 +# Actuator 监控配置项 +management: + server.port: 38080 # 独立端口,避免被暴露出去 + endpoints.web.exposure.include: '*' # 暴露所有监控端点 +server.port: ${management.server.port} # 设置使用 Actuator 的服务器端口,因为 RPC 服务不需要 Web 端口 + # Mall 配置项 mall: # 错误码配置项对应 ErrorCodeProperties 配置类