Profile

1、多Profile文件
  • 在编写配置文件时可以是 application-{profile}.properties/yml
    默认使用application.properties的配置
    springboot中多场景配置文件使用
2、yml多文档块模式
  • 使用—进行分割
    springboot中多场景配置文件使用
3、**指定profile
  • 在配置文件中指定 spring.profiles.active=dev
  • 命令行:
    —spring.properties.active=dev
    springboot中多场景配置文件使用

相关文章: