When I use Playframework (2.8.11, scala) in dev mode via sbt ~run, it allows calls to controllers even though dependency injection via Guice has not been completed.
This is a problem for me, because I generate test data at play startup. This test data should be available before the first request hits the controller. My problem is that the request hits the controller before the test data has been created. I then have to hit F5 in the browser. This triggers a reload of the play application. Only then the test data bootstrapping is executed before the request is processed.
This slows down my development cycle considerably.
This is how I set up the test data (created this testdata branch for discussion):
This is the controller that should already consume the test data and fails if it is not there:
Any ideas why Play processes the first request even though DI (and therefore test data creation via the DbBootstrap class) is not complete?