From 99516241dda90ed5d23fa0f9a4b9e4a124022e62 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Fri, 27 Feb 2015 21:29:24 +0800 Subject: [PATCH] Update 36.1. Understanding auto-configured beans.md --- .../36.1. Understanding auto-configured beans.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IV. Spring Boot features/36.1. Understanding auto-configured beans.md b/IV. Spring Boot features/36.1. Understanding auto-configured beans.md index e69de29..3667cfd 100644 --- a/IV. Spring Boot features/36.1. Understanding auto-configured beans.md +++ b/IV. Spring Boot features/36.1. Understanding auto-configured beans.md @@ -0,0 +1,5 @@ +### 36.1. 理解auto-configured beans + +从底层来讲,auto-configured是使用标准的@Configuration实现的类,另外的@Conditional注解用来约束在什么情况下使用auto-configuration。通常auto-configuration类使用@ConditionalOnClass和@ConditionalOnMissingBean注解。这是为了确保只有在相关的类被发现,和你没有声明自己的@Configuration时才应用auto-configuration。 + +你可以浏览spring-boot-autoconfigure的源码,查看我们提供的@Configuration类(查看META-INF/spring.factories文件)。