Play-Framework 2.4: Use Spring Depedency Injection with Play-Framework Instead of Guice

后端 未结 3 1765
小鲜肉
小鲜肉 2021-01-21 00:13

I am using Spring-Depedency injection instead of Play-Framework Guice Depedency injection, because of our requirement, we need to use most of the

3条回答
  •  猫巷女王i
    2021-01-21 00:40

    May be a late answer for this question. Posting it for the benefit of future reference.

    I faced a similar challenge of using spring beans in Play 2.5.X. There is an api guice-spring provided by guice to integrate spring with guice injector. Using this api I was able to configure guice to fetch beans form my spring context for injection, especially my controller beans. Check this link to see how to bind a spring bean into guice.

提交回复
热议问题