摘要: 依赖注入,DI(Dependency Injection),它的作用自然不必多说,提及DI容器,例如spring,picoContainer,EJB容器等等,近日,google诞生了更轻巧的DI容器……Guice!废话不多讲了,先看看Guice是如何实现注入的吧。定义一个简单的service接口和它的实现吧:publicinterfaceMyService{voidmyMethod();}publicclassMyServiceImplimplementsMyService{publicvoidmyMethod(){System.out.println("Hello,World!&q 阅读全文
posted @ 2013-11-28 15:00 草原战狼 阅读(602) 评论(0) 推荐(0) 编辑
草原战狼淘宝小店

No one indebted for others,while many people don't know how to cherish others.

No one indebted for others,while many people don't know how to cherish others.

Don‘t cry because it is over, smile because it happened.

Don‘t try so hard, the best things come when you least expect them to.