mitao
2025-03-14 392b42c4891cf2e6beda57ab32c51598f290f4b7
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
36
# Tomcat
server:
  port: 9202
 
# Spring
spring: 
  application:
    # 应用名称
    name: ruoyi-gen
  profiles:
    # 环境配置
    active: dev
---
spring:
  config:
    activate:
      on-profile: dev
  cloud:
    nacos:
      discovery:
        # 服务注册地址
        server-addr: 192.168.110.64:8848
        service: ${spring.application.name}
        group: DEFAULT_GROUP
        namespace: 8ebd2324-30b4-477b-af79-b46e717c4fbe
      config:
        # 配置中心地址
        server-addr: 192.168.110.64:8848
        namespace: 8ebd2324-30b4-477b-af79-b46e717c4fbe
        group: DEFAULT_GROUP
        name: ${spring.application.name}
        # 配置文件格式
        file-extension: yml
        # 共享配置
        shared-configs:
          - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}