cool breeze
cool breeze

Reputation: 4811

Does playframework have some sort of a library to work with guice?

In my play 2.1 app I was using Guice, but to bind my interfaces to implementations for IoC I was using this library:

https://github.com/sptz45/sse-guice

Is this still needed for play 2.4? If not, do they have their own helpers that are like sse-guice?

Upvotes: 0

Views: 27

Answers (1)

Ali Dehghani
Ali Dehghani

Reputation: 48163

As the What’s new in Play 2.4 page states:

Play now supports dependency injection out of the box.

You have the following options for DI in Play 2.4.x:

  • An implementation that uses Guice out of the box
  • An abstraction that allows other JSR 330 implementations to be plugged in
  • All Play components can be instantiated using plain constructors or factory methods
  • Traits that instantiate Play components that can be mixed together in a cake pattern like style to assist with compile time dependency injection

You can read more about Play’s dependency injection support for Scala.

Upvotes: 1

Related Questions