hjl
2024-07-01 03c6572c7918beaa20365e69c9694a11f0d9948a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Spring
spring:
  application:
    # 应用名称
    name: ruoyi-user
  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: 5b0cc96f-d058-4986-a46f-64644ff8a467
      config:
        # 配置中心地址
        server-addr: 127.0.0.1:8848
        group: DEFAULT_GROUP
        namespace: 5b0cc96f-d058-4986-a46f-64644ff8a467
        name: ${spring.application.name}
        # 配置文件格式
        file-extension: yml
        # 共享配置
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}