spring boot Basics

Spring @SpringBootApplication opened and scanning components of the Boot Spring autoconfiguration. The actual
on, @SpringBootApplication three useful notes combined together

1, Spring of @Configuration: indicate the class uses a Java-based Spring Configuration

2, Spring of @ComponentScan: Enable component scans, so you write Web controller class and other components in order to be
automatically discovered and registered as a Spring application context in the Bean

3, Spring Boot's @EnableAutoConfiguration: This line is configured to open a magic Spring Boot automatically configured, so you do not have to write
articles configured.

Spring Boot of @Controller: add this comment, component scans to find it

Guess you like

Origin www.cnblogs.com/mantishell/p/11222801.html