Can I have two Global settings objects for Play2?
I know there is only setting available at application.conf.
global=common.GlobalOne
Two Global classes:
public class GlobalOne extends GlobalSettings {
@Override
public void onStart(Application app) {
Logger.info("****** Set something ******");
}
}
public class GlobalTwo extends GlobalSettings {
@Override
public void onStart(Application app) {
Logger.info("****** some other ******");
}
}
The reason I am asking is for play 2 modules. How to have a global setting object in a module so it can be enabled when a project uses it?
That’s not possible.
GlobalSettingsapply to an application, not modules. Therefore, modules should not define aGlobalSettingsobject.