Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 2.04 KB

README.md

File metadata and controls

24 lines (18 loc) · 2.04 KB

Default play-java template with Spring

Specs

Introduction

Getting Play Framework < 2.4 to work with Spring Framework, was relative easy: https://www.playframework.com/documentation/2.3.x/JavaInjection.

In Play Framework 2.4, they added "dependency injection support":

Out of the box, Play provides dependency injection support based on JSR 330. The default JSR 330 implementation that comes with Play is Guice, but other JSR 330 implementations can be plugged in.

But getting Play 2.4 to work with for example Spring dependency injection is hard to accomplish, especially compared to 2.3, where you could get it to work with just a few lines of code. So instead of making it easier, they made it a lot harder, and basically forced the use Google Guice as depedency injection container, which is also used internally by Play since 2.4.

But thanks to the Spring-Guice snapshot project, we don't have to learn and write the complex Spring and Guice internals.

Notes