1、多Profile文件
我们在主配置文件编写的时候,文件名可以是application-{profile}.properties/yml
默认使用application.properties的配置

2、yml支持多文档块方式

server:
  port: 8081
Spring:
  profiles:
    active: prd
---
server:
  port: 8083
spring:
  profiles: dev

---
server:
  port: 8084
spring:
  profiles: prd  #指定属于哪个环境
application.properties

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2021-12-04
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2022-01-03
  • 2021-06-25
  • 2021-12-15
相关资源
相似解决方案