Anatomy of SpringBoot-Core Startup Notes

Insert picture description here
You can see that there is a comment on our startup class Ctrl+left click to check it out
Insert picture description here
. There are quite a lot of comments in it, and the core comments are these three.

  • @ComponentScan component scan
  • @EnableAutoConfiguration core annotation is the entry point for automatic configuration
  • @SpringBootConfiguration Annotates this class as the SpringBoot configuration class
    Insert picture description here
    @EnableAutoConfiguration is to complete the automatic configuration from the corresponding configuration class in spring.factories.
    Insert picture description here
    If there is anything wrong, please point out

Guess you like

Origin blog.csdn.net/qq_36008278/article/details/115138854