I have been very concise, two (Spring boot boot process (a), Pring boot boot process (ii)) is still not finished, and then come.
Refreshcontext after the method is AfterRefresh, the name of the real ... Good. The AfterRefresh method only calls a Callrunners method, which obtains all the implementation classes of the Applicationrunner and Commandlinerunner interfaces from the context and executes the run methods of these implementation classes. For example, Joblaunchercommandlinerunner for spring batch:
@Override publicvoidthrows jobexecutionexception { Logger.info ("Running default command line with:" + arrays.aslist (args)); =")); }
listeners.finished (context, NULL) actually publishes the Applicationreadyevent event in case exception is null.
Starting here is almost the same, so stop stopwatch.stop (), and then hit the time log: Started application in ***.462 seconds (JVM running for ***.977), And then feel the momentum of the throw after this memory:
if (this. Logstartupinfo) { new Startupinfologger (this. Mainapplicationclass) . logstarted (Getapplicationlog (), stopWatch); }
This concludes by returning a Context,run method.
==========================================================
The github:https://github.com/saaavsaaa we used recently
Public Number:
Spring Boot boot process (iii)