preface
Again, this post is based on the interview question posed by fans of Fat North Korea
Frankly speaking, the daily news is quite a lot, often can not see over. Just as MY fat hand was about to swipe away the chat window, he struck me with a few brief words!
Straight into the theme
The problem, we can use primary school Language teachers to teach us to write a composition of the common routine, total total
The total
Springapplication. run does two things
-
Create the SpringApplication object
-
With the created SpringApplication object, call the run method
points
1. Create a SpringApplication object
2. Call the run method
The total
Too many class names and stuff to remember? That’s all right. That sums it up for you:
Interviewer: I see that you are familiar with SpringBoot on your resume. Can you tell me what springApplication.run does?
Springapplication. run does two things in total. One is to create a SpringApplication object. When the object is initialized, it finds the configured event listener and saves it. The second thing is to run the run method, which will trigger different events depending on the time of the event listener, such as container initialization, container creation, and so on. It also refreshes the IoC container for component scanning, creation, loading, and so on. These two things I have read the source code, I respectively draw a picture for you to talk about carefully.
Interviewer:
Fertilizer toward is a focus on principle, source code, development skills of technical public number, number of original thematic source code analysis, real scene source code principle combat (key).Scan the following QR codePay attention to fat, let should build rocket you, no longer screw!