playframework/playframework — pull request #3580 by pvlugter (2014-10-30 05:12:16+00:00)
Title: Fix compile-time routes injection

Include the `BuiltInCompenents.routes` in the `SimpleInjector`. Extend the compile-time injection test to check the router works and is correct.

The default application routes, which is triggered by `Play.start`, uses the injector. This falls back to the `NewInstanceInjector`, which can't instantiate the `Router.Routes` trait, and would also be ignoring the given router.

This was discovered when trying to run the documentation application, which failed on new instance injection of routes and http configuration. Also fixed this by using the now working `BuiltInComponents` and passing the null router.

The `NewInstanceInjector` can't be used directly with `DefaultApplication` given these lookups.