What are the benefits of dependency injection containers?

前端 未结 16 2781
南笙
南笙 2020-12-02 04:09

I understand benefits of dependency injection itself. Let\'s take Spring for instance. I also understand benefits of other Spring featureslike AOP, helpers of different kind

16条回答
  •  旧时难觅i
    2020-12-02 05:02

    Spring also has a properties loader. We use this method to set variables that are dependant on the environment (e.g. development, testing, acceptance, production, ...). This could be for example the queue to listen to.

    If there is no reason why the property would change, there is also no reason to configure it in this way.

提交回复
热议问题