From 24b4cbb780163ac89e6613f241758efcba7cb12d Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Mon, 16 Mar 2015 00:23:06 +0800 Subject: [PATCH] Update 11.3.2. The @EnableAutoConfiguration annotation.md --- .../11.3.2. The @EnableAutoConfiguration annotation.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/II. Getting started/11.3.2. The @EnableAutoConfiguration annotation.md b/II. Getting started/11.3.2. The @EnableAutoConfiguration annotation.md index e69de29..ae4ff42 100644 --- a/II. Getting started/11.3.2. The @EnableAutoConfiguration annotation.md +++ b/II. Getting started/11.3.2. The @EnableAutoConfiguration annotation.md @@ -0,0 +1,5 @@ +### 11.3.2. @EnableAutoConfiguration注解 + +第二个类级别的注解是`@EnableAutoConfiguration`。这个注解告诉Spring Boot根据添加的jar依赖猜测你想如何配置Spring。由于`spring-boot-starter-web`添加了Tomcat和Spring MVC,所以auto-configuration将假定你正在开发一个web应用并相应地对Spring进行设置。 + +**Starter POMs和Auto-Configuration**:设计auto-configuration的目的是更好的使用"Starter POMs",但这两个概念没有直接的联系。你可以自由地挑选starter POMs以外的jar依赖,并且Spring Boot将仍旧尽最大努力去自动配置你的应用。