How to efficiently implement a strategy pattern with spring?

后端 未结 3 2072
孤城傲影
孤城傲影 2021-01-03 12:09

I have a web application developped in Java 1.5 with Spring framework. Application contains \"dashboards\" which are simple pages where a bunch of information are regrouped

3条回答
  •  星月不相逢
    2021-01-03 12:15

    While it is perfectly "correct" to employ the strategy pattern as you have, but considering the fact that you're using Spring - it would be better to employ the Dependency Injection mechanism provided by the Spring framework - might as well put to use what your framework has to offer as one of its core strengths.

提交回复
热议问题