springBoot多環境配置

很多場景的配置,比如數據庫配置。在不同的環境,我們需要不同的包去運行項目。所以看項目結構,有兩個環境配置: 1.application-dev.properties 開發環境 2.application-prod.properties 生產環境 Spring Boot 是通過 application.properties 文件中,設置 spring.profiles.active 屬性選擇加載配置
相關文章
相關標籤/搜索