SpringBoot-- automatic configuration principle - 4 comment

First, the principle of automatic configuration

Four yuan Note: The modified annotated notes

@Target(ElementType.TYPE)

This annotation is used in that position, can be used in the class, the method, the member variables

@Retention(RetentionPolicy.RUNTIME

Preservation strategy: run-time function that you can use reflection

@Documented

Documentation Note: You can generate go to the API documentation

@Inherited

Marked inherit Note: the parent class notes, and their own subclass inherits these notes 

 

Configuration classes 118

@SpringBootConfiguration: springBoot comment

@Configuration: Configuration notes (Spring comment)

@EnableAutoConfiguration: Start automatic configuration

 

Guess you like

Origin www.cnblogs.com/minmin123/p/11305233.html