I'm trying to migrate my GlobalSettings to playframework 2.4 but I'm having a hard time understanding what I'm supposed to do.
Currently my Global is like below, I already moved out the onRequest to the RequestHandler properly:
public class Global extends GlobalSettings {
private BackgroundTasks backgroundTasks;
@Override
public void onStart(Application arg0) {
Logger.info("Starting background tasks");
backgroundTasks = new BackgroundTasks();
}
@Override
public void onStop(Application arg0) {
Logger.info("Stopping background tasks");
backgroundTasks.shutdown();
super.onStop(arg0);
Logger.info("Saving modules data");
for(Module m: controllers.Application.modules){
m.saveData();
}
}
}