Integrate Guice component into Spring application

前端 未结 3 583
鱼传尺愫
鱼传尺愫 2021-01-11 21:20

We have a Spring framework based application and need to integrate a component that is built using Google Guice.

Can anybody give us some advice on how this can be

3条回答
  •  再見小時候
    2021-01-11 22:20

    Both Spring and Guice support JSR 330: Dependency Injection for Java. If the Guice component you need is defined using JSR 330 annotations, or if you have access to the code an can change the annotations, then you should be able to use it in an Spring managed bean.

    See Spring: Using JSR 330 Standard Annotation and Guice JSR-330 Integration

提交回复
热议问题