07 点积

阅读 50

2023-11-05

1.yml文件(旧)

说明:旧的写法。

#应用环境
spring:
  profiles:
    active: dev
---
#设置环境


#生产环境
spring:
  profiles: pro
server:
  port: 81

---
#开发环境
spirng:
  profiles: dev
server:
  port: 81


---
#测试环境
spring:
  profiles: test
server:
  port: 82

2. yml文件(新)

说明:以下是最新配置。

#应用环境
spring:
  profiles:
    active: test
---
#设置环境


#生产环境
spring:
  config:
    activate:
      on-profile: pro
server:
  port: 81

---
#开发环境
spring:
  config:
    activate:
      on-profile: dev
server:
  port: 81


---
#测试环境
spring:
  config:
    activate:
      on-profile: test
server:
  port: 82

精彩评论(0)

0 0 举报