Hi All,
I am quite new in play framework. I am trying to inject spring bean to my controller:
@Component
public class Application extends Controller {
private static RepositoryUser ru;
@Inject
public Application(RepositoryUser ru) {
}
public static Result index() {
return ok(index.render(""));
}
}
it works fine when action is declared in static way. However I've seen some posts that it is not required any more. Unfortunately I'm getting compilation errors when I'm removig 'static'.
Ideally I would like to inject bean via setters not via constructor and I would like to avoid doing it in static way.
Thanks,
Jakub