PropertyPlaceholderConfigurer and environment variables in .properties files

后端 未结 3 1409
误落风尘
误落风尘 2020-12-25 15:28

I have a Spring application-context.xml with PropertyPlaceholderConfigurer to get properties\' values from .properties file. Main and test source folders have separate .prop

3条回答
  •  死守一世寂寞
    2020-12-25 15:44

    Using:

    
    

    Change your:

    property.name=${env.SYSTEM_PROPERTY}
    

    To:

    property.name=${SYSTEM_PROPERTY}
    

    I'm using Spring 3.0.4.RELEASE, but I have no idea when this was introduced.

提交回复
热议问题