Spring and Guice together, or just Spring

后端 未结 5 1981
盖世英雄少女心
盖世英雄少女心 2020-12-31 00:01

I\'m starting a new Java web app from scratch.

I don\'t have much experience on Spring Framework, but I know I\'d like to use some of its features, such as Transacc

5条回答
  •  我在风中等你
    2020-12-31 00:45

    I would also suggest you take a look at HK2 for a light-weight J2SE DI engine. It is similar to Guice and CDI and has many extensibility features that you might find interesting. It also works with Guice and Spring via bi-directional bridges. You can start learning about HK2 here: http://hk2.java.net/. Information on the Guice bridge is here: https://hk2.java.net/2.2.0-b27/guice-bridge.html. Information on the Spring bridge is here: https://hk2.java.net/2.2.0-b27/spring-bridge.html.

    The decision of which DI provider to use is based a lot on the special features needed by your application.

提交回复
热议问题