无关风月
2024-09-10 f09e9171c282c90a925f68ec773eeaa571dee3da
课程代码
2个文件已添加
117 ■■■■■ 已修改文件
xinquan-modules/xinquan-file/src/main/resources/bootstrap.yml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-order/src/main/resources/bootstrap.yml 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-file/src/main/resources/bootstrap.yml
New file
@@ -0,0 +1,35 @@
# Tomcat
server:
  port: 9300
# Spring
spring:
  application:
    # 应用名称
    name: xinquan-file
  profiles:
    # 环境配置
    active: dev
---
spring:
  config:
    activate:
      on-profile: dev
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: cb7a3ad3-9e06-4a70-85d6-a774a1e76295
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        namespace: cb7a3ad3-9e06-4a70-85d6-a774a1e76295
        group: DEFAULT_GROUP
        name: ${spring.application.name}
        # 配置文件格式
        file-extension: yml
        # 共享配置
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
xinquan-modules/xinquan-order/src/main/resources/bootstrap.yml
New file
@@ -0,0 +1,82 @@
# Spring
spring:
  application:
    # 应用名称
    name: xinquan-order
  main:
    allow-bean-definition-overriding: true
  profiles:
    # 环境配置
    active: dev
---
spring:
  config:
    activate:
      on-profile: dev
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: cb7a3ad3-9e06-4a70-85d6-a774a1e76295
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        namespace: cb7a3ad3-9e06-4a70-85d6-a774a1e76295
        group: DEFAULT_GROUP
        name: ${spring.application.name}
        # 配置文件格式
        file-extension: yml
        # 共享配置
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
---
spring:
  config:
    activate:
      on-profile: prod
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2
        group: DEFAULT_GROUP
        name: ${spring.application.name}
        # 配置文件格式
        file-extension: yml
        # 共享配置
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
---
spring:
  config:
    activate:
      on-profile: test
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 127.0.0.1:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        namespace: 96712c7a-480b-4f40-b783-39f00f3b33ce
        group: DEFAULT_GROUP
        name: ${spring.application.name}
        # 配置文件格式
        file-extension: yml
        # 共享配置
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}