Reputation: 1
I want to execute business logic before a request is dispatched to an action.
This is my code:
public class Global extends GlobalSettings {
public Action onRequest(Http.Request request, Method actionMethod){
System.out.println("before each request..." + request.toString());
return super.onRequest(request, actionMethod);
}
}
But it is not working.
Upvotes: 0
Views: 236
Reputation: 8202
The use of Global
is deprecated in Play 2.5 as part of the move away from global state.
Use filters instead. You can find a detailed breakdown in the documentation.
Upvotes: 1