How to achieve conditional resource import in a Spring XML context?

前端 未结 8 728
醉梦人生
醉梦人生 2020-11-27 14:25

What I would like to achieve is the ability to "dynamically" (i.e. based on a property defined in a configuration file) enable/disable the importing of a child Spr

8条回答
  •  無奈伤痛
    2020-11-27 15:04

    With Spring 3.1.x you can use bean profiles to achieve conditional resource import and bean instantiation. This is of course of no help if you are using an earlier version :)

提交回复
热议问题