playframework / playframework/play1

Use Guice as dependency injection provider in Play

Open
#1,199 1 comment 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
671
Avg merge
12d 15h
Merged PRs (30d)
1

Description

What do you think about using Guice as dependency injection provider in Play?
Currently, Play! contains class play.inject.Injector, but no implementations/usages of it. It's really strange.

We use play-guice module in our projects, but it seems to be a natural fit to framework itself. I suggest to incorporate play-guice into Play! itself. Then we could naturally inject non-static dependencies into controllers, plugins, jobs etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names play.inject.Injector and the external play-guice module; start by reviewing those entry points and how Play currently handles controllers, plugins, and jobs. The proposal has no acceptance criteria, so first establish the integration scope and a testable definition of done with maintainers.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.