Hi All,
I recently migrated our Play 2.2.6 application to Play 2.7.x.
I am new to Play and trying to resolve a compile error inside the controller RecoveryManagement.Java. In this controller I am trying to perform a redirect operation like below:
return redirect(controllers.routes.Application.login());
The error is that controllers.routes cannot be resolved.
As per the play 2.7 documentation for reverse routing we can the Action login() by using “controllers.routes.Application” reverse controller and each controller package has a routes subclass.
I am importing what is required
import play.*;
import play.mvc.*;
conf/routes has the below setting
# login action
GET / controllers.Application.login()
Documentation Referred to -
https://www.playframework.com/documentation/2.7.x/JavaRouting
I think that there is something I am missing and hoping that experts in this forum could help me figure this out.