how to use Spring Boot profiles

前端 未结 12 1177
忘了有多久
忘了有多久 2020-12-04 21:14

i have application.yml,application-dev.ymlandapplication-dev.yml

  1. I\'m using the maven command mvn spring-boot:run
12条回答
  •  春和景丽
    2020-12-04 21:59

    Working with Intellij, because I don't know how to set keyboard shortcut to mvn spring-boot:run -Dspring.profiles.active=dev, I have to do this:

    
        org.springframework.boot
        spring-boot-maven-plugin
        
            
                -Dspring.profiles.active=dev
            
        
    
    

提交回复
热议问题