阅读背景:

玩框架java依赖注入 - 何时使用单例

来源:互联网 

I am trying to work out how to use dependency injection in Play Framework 2.4. I am familiar with general principles, but don't really understand the implications for design. My general reasoning has been, static methods in controller classes are too much like using global variables, and that can easily cause issues with thread safety etc., plus in general encourage bad design. So since Play now encourages switching to dependency injection, I should switch as well.I am trying to work out how to use dependency i




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: