Part 1
Guice and Play, part 1: I deleted my wiring file and Guice built the graph
At work I wire Play apps by hand with the cake pattern. In my own projects I switched a Play 3 template to Guice: one deleted config line, one @Inject(), and a timestamp that made me think Guice was broken.
23 Oct 2026
·
6 min read
·46 views
Part 2
Guice and Play, part 2: the moment Guice can't guess
A test that could not pass forced my first trait into the graph. @ImplementedBy, a root Module, a test that builds the real Guice graph, and the error Guice prints when a binding is missing.
23 Oct 2026
·
5 min read
·52 views
Part 3
Guice and Play, part 3: eager doesn't mean at boot
A MongoDB client as an eager singleton, closed by an ApplicationLifecycle stop hook. Why sbt run printed nothing until the first request, and why my tests built three clients.
25 Oct 2026
·
5 min read
·41 views
Part 4
Guice and Play, part 4: teaching Guice to build what it can't
A Provider class for the MongoDB client, a @Provides method for the database, and @Named qualifiers for two clocks of the same type, with the real errors Guice prints when I get it wrong.
25 Oct 2026
·
5 min read
·51 views