I created a new Play application with Intellij 15. The play version used was 2.4.2 so I updated it to 2.4.6 following the migration guide. I changed my Application controller to a Java class, but now I'm getting the following error:
Class 'Application' must either be declared abstract or implement abstract method 'RequestTimeout()' in 'Controller'
Here is what my application controller looks like:
package controllers;
import play.api.mvc.Controller;
import play.api.mvc.Result;
public class Application extends Controller {
public Result index() {
return ok(views.html.index("Your new application is ready."));
}
}
I did add the routes generator (routesGenerator := InjectedRoutesGenerator) to my build.sbt as suggested in the Dependency Injection section of the migration guide.
Some final notes:
(1) I created the application as a Scala Play application because IntelliJ did not generate the project correctly when I tried creating it as a Java application with the Play framework, and I want to use sbt anyways.
(2) I noticed that the Scala Application controller was generated as an object rather than a class, indicating that it was still using static routes; so I'm guessing it has something to do with the dependency injection, but I don't see anything in their documentation other than the steps in the migration guide.
Any idea what I'm missing?