From ff987c1b72aceaaa17c5f486052cf96323b11d32 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 19 九月 2024 18:52:03 +0800 Subject: [PATCH] 增加生产环境配置 --- ruoyi-auth/src/main/resources/bootstrap.yml | 56 +++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 41 insertions(+), 15 deletions(-) diff --git a/ruoyi-auth/src/main/resources/bootstrap.yml b/ruoyi-auth/src/main/resources/bootstrap.yml index 0f74bbf..56494a5 100644 --- a/ruoyi-auth/src/main/resources/bootstrap.yml +++ b/ruoyi-auth/src/main/resources/bootstrap.yml @@ -1,13 +1,16 @@ +server: + port: 9100 # Spring spring: profiles: # 环境配置 - active: dev + active: prod application: # 应用名称 name: ruoyi-auth main: allow-bean-definition-overriding: true + allow-circular-references: true --- spring: config: @@ -36,9 +39,7 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - --- - seata: enabled: true application-id: ${spring.application.name} @@ -51,8 +52,16 @@ config: type: nacos nacos: - server-addr: 192.168.110.169:8848 - namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb + # 开发环境 +# server-addr: 192.168.110.169:8848 +# namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos + # 生产环境 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a group: DEFAULT_GROUP data-id: seata-server.properties username: nacos @@ -61,16 +70,31 @@ type: nacos nacos: application: seata-server - server-addr: 192.168.110.169:8848 - namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb + # 开发环境 +# server-addr: 192.168.110.169:8848 +# namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb +# group: DEFAULT_GROUP +# username: nacos +# password: nacos + # 生产环境 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a group: DEFAULT_GROUP username: nacos password: nacos cloud: nacos: discovery: - server-addr: 192.168.110.169:8848 # nacos注册中心地址 - namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 + # 开发环境 + # server-addr: 192.168.110.169:8848 # nacos注册中心地址 + # namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 + # group: DEFAULT_GROUP + # application: seata-server #Nacos 中 Seata 名称 + # username: nacos + # password: nacos + # 生产环境 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos @@ -79,8 +103,6 @@ transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -90,14 +112,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 -- Gitblit v1.7.1