property not found with multiple context:property-placeholder

前端 未结 4 974
温柔的废话
温柔的废话 2020-12-16 05:17

I am using spring 3.1 with spring profiles to load the beans. In my app context file, I load the properties like :



        
4条回答
  •  太阳男子
    2020-12-16 05:49

    This bug about multiple property placeholders might relate to your problem: https://jira.spring.io/browse/SPR-9989

    When using multiple PropertyPlaceholderConfigurer in conjunction with @Value annotation and default value for placeholders syntax (ie ${key:defaultValue}), only the first PropertyPlaceholderConfigurer is used. If this configurer does not contain the desired value, it falls back to @Value default even if the second PropertyPlaceholderConfigurer contains the value.

    Affects Version/s: 3.1.3

提交回复
热议问题