Integrating Play framework 2.0 and Spring framework

balteo picture balteo · Mar 14, 2012 · Viewed 17.4k times · Source

I have developed a Spring/JPA application: the service, repository and domain layers are nearing completion.

The only layer that is missing is the web layer. I am considering using Playframework 2.0 for the web layer but I am not sure whether I can inject/use spring beans in my Playframework 2.0 classes.

Is this possible? If so how?

Answer

Will Sargent picture Will Sargent · Mar 15, 2012

You can. Updated for Play 2.5.x:

https://github.com/remithieblin/play-spring-loader