1.Spring boot annotations
(1) @SpringBootApplication the Spring component scan and spring boot automatic configuration are turned on, in fact, @Spring Bootapplication is the combination of three annotations, the three annotations are
@Configuration, @ComponentScan, @EnanleAutoConfiguration, in earlier versions of spring, you need to use these three annotations on the class at the same time, but starting with spring Boot1.2.0, Just use the @springbootapplication, and we'll explain the role of the three annotations.
@Configuration: Indicates that the class uses spring Java-based configuration
@ComponentScan: Enable component scanning so that the Web control classes and other components that you write can be automatically discovered and registered as beans in the spring application context.
@EnanleAutoConfiguration: This humble little note can also be called @abracadabra, which is the same as configuring the spring boot to automatically configure the magic, so you don't have to write the configuration of the article.
Beginner Spring Boot