Spring “spring.profiles.include” overrides

后端 未结 5 1059
感情败类
感情败类 2021-02-01 18:47

My intention is to have two profiles in a spring boot application - development and production one. Development profile is meant just to override some variables of production pr

5条回答
  •  梦毁少年i
    2021-02-01 19:34

    You could add a new profile in the application-bar.yaml:

    spring.profiles.include: foo,foo-override
    myproperty: 33
    
    ---
    spring.profiles: foo-override
    myproperty: 55
    

    The order is: 33 in bar overridden by 44 in foo overridden by 55 in foo-override.

提交回复
热议问题