1. 程式人生 > 其它 >SpringBoot引入外部yml配置檔案

SpringBoot引入外部yml配置檔案

技術標籤:SpringBoot

如果不想把所有的配置都寫在application.yml檔案中,把它拆分成多個yml檔案,並在application.yml檔案中引用,則只需要做以下配置

注意:其餘的yml命名格式為application-***.yml

在application.yml檔案中配置如下:

spring:
  profiles:
    include: upload