Loading Properties with Spring (via System Properties)

前端 未结 3 662
暖寄归人
暖寄归人 2020-12-31 14:22

My problem is as follows:

I have server.properties for different environments. The path to those properties is provided trough a system property called

3条回答
  •  臣服心动
    2020-12-31 15:15

    You have two options:

    • use sys: as prefix (and hence sys:propertyPath)

    • set the placeholderSuffix property of the placeholder configurer to }, so that you can access the properties with sys{prop}. If you omit this property, you will have to use sys{prop

提交回复
热议问题