/** * Initializes the app in non-atomic way. * Then starts serving requests immediately when routes are configured. */ public static synchronized void run(String[] args, String... extraArgs) { AppStarter.startUp(args, extraArgs); // no implicit classpath scanning here boot(); // finish initialization and start the application onAppReady(); boot(); }
@Override public void destroy() { halt(); Setups.deregister(this); }
@Override public void cleanUp() { My.reset(); App.resetGlobalState(); On.changes().ignore(); Setups.clear(); Env.reset(); }
/** * Initializes the app in non-atomic way. * Then scans the classpath for beans. * Then starts serving requests immediately when routes are configured. */ public static synchronized void bootstrap(String[] args, String... extraArgs) { AppStarter.startUp(args, extraArgs); boot(); App.scan(); // scan classpath for beans // finish initialization and start the application onAppReady(); boot(); }