Is it possible to have multiple PropertyPlaceHolderConfigurer in my applicationContext?

前端 未结 8 1297
臣服心动
臣服心动 2020-12-01 01:16

I need to load a specific applicationContext.xml file according to a given system property. This itself loads a file with the actual configuration. Therefore I need 2 Proper

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 01:52

    On my own side, playing with PropertyPlaceholderConfigurer both properties :

    • order (should be lower for first accessed/parsed PPC)
    • ignoreUnresolvablePlaceholders ("false" for first accessed/parsed PPC, "true" for next one)

    • and also give 2 distinct id(s) to both PPC (to avoid one to be overwritten by the other)

    works perfectly

    Hope it helps

提交回复
热议问题