1、@SpringBootApplication
2、@EnableAutoConfiguration
3、@Configuration
4、@SpringBootConfiguration
5、@ComponentScan
6、@Conditional
7、@ConditionalOnBean
8、@ConditionalOnMissingBean
9、@ConditionalOnClass
10、@ConditionalOnMissingClass
11、@ConditionalOnWebApplication
当前项目有以下 3 种类型。
enum Type {
/** * Any web application will match. */ ANY, /** * Only servlet-based web application will match. */ SERVLET, /** * Only reactive-based web application will match. */ REACTIVE
12、@ConditionalOnNotWebApplication
13、@ConditionalOnProperty
14、@ConditionalOnExpression
15、@ConditionalOnJava
16、@ConditionalOnResource
17、@ConditionalOnJndi
18、@ConditionalOnCloudPlatform
19、@ConditionalOnSingleCandidate
20、@ConfigurationProperties
21、@EnableConfigurationProperties
22、@AutoConfigureAfter
这个和 @AutoConfigureAfter 注解使用相反,表示该自动配置类需要在另外指定的自动配置类配置之前。