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

后端 未结 3 1764
小鲜肉
小鲜肉 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条回答
  •  广开言路
    2021-01-21 00:45

    This answer will not solve your problem but I hope it will guide you how to overcome your problem using a different approach. First of all, I'm using Spring integrated in Play however, Spring uses an abstraction class and handles its own life cycle for now. Play (2.4.*) uses its default Guice injection support.

    For your problem, after my research I've found these links about replacing/integrating Spring's dependency injection with juice in Play 2.4. However, integration with Spring for Play 2.4 doesn't exist yet, there is only a prototype done by James Ropper as stated in this issue:

    github.com/playframework/playframework/issues/4665

    github.com/jroper/play-spring

    github.com/spring-projects/spring-guice

提交回复
热议问题