Skip to content

Commit ccae70b

Browse files
committed
Update springboot-questions.md
1 parent 9733291 commit ccae70b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/system-design/framework/spring/springboot-questions.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Spring Boot Starters 是一系列依赖关系的集合,因为它的存在,
3737
</dependency>
3838
```
3939

40-
### 5.如何在Spring Boot应用程序中使用Jetty而不是Tomcat?
40+
### 5. 如何在Spring Boot应用程序中使用Jetty而不是Tomcat?
4141

4242
Spring Boot Web starter使用Tomcat作为默认的嵌入式servlet容器, 如果你想使用 Jetty 的话只需要修改pom.xml(Maven)或者build.gradle(Gradle)就可以了。
4343

@@ -73,7 +73,7 @@ compile("org.springframework.boot:spring-boot-starter-jetty")
7373

7474
说个题外话,从上面可以看出使用 Gradle 更加简洁明了,但是国内目前还是 Maven 使用的多一点,我个人觉得 Gradle 在很多方面都要好很多。
7575

76-
### 6.介绍一下@SpringBootApplication注解
76+
### 6. 介绍一下@SpringBootApplication注解
7777

7878
```java
7979
package org.springframework.boot.autoconfigure;
@@ -108,7 +108,7 @@ public @interface SpringBootConfiguration {
108108
- `@ComponentScan`: 扫描被`@Component` (`@Service`,`@Controller`)注解的bean,注解默认会扫描该类所在的包下所有的类。
109109
- `@Configuration`:允许在上下文中注册额外的bean或导入其他配置类
110110

111-
### (重要)Spring Boot 的自动配置是如何实现的
111+
### 7. (重要)Spring Boot 的自动配置是如何实现的?
112112

113113
这个是因为`@SpringBootApplication `注解的原因,在上一个问题中已经提到了这个注解。我们知道 `@SpringBootApplication `看作是 `@Configuration``@EnableAutoConfiguration``@ComponentScan ` 注解的集合。
114114

@@ -177,7 +177,7 @@ public class WebSecurityEnablerConfiguration {
177177

178178
更多内容可以参考这篇文章:https://sylvanassun.github.io/2018/01/08/2018-01-08-spring_boot_auto_configure/
179179

180-
### 7. Spring Boot支持哪些嵌入式web容器?
180+
### 8. Spring Boot支持哪些嵌入式web容器?
181181

182182
Spring Boot支持以下嵌入式servlet容器:
183183

@@ -191,7 +191,7 @@ Spring Boot支持以下嵌入式servlet容器:
191191

192192
这就是你为什么可以通过直接像运行 普通 Java 项目一样运行 SpringBoot 项目。这样的确省事了很多,方便了我们进行开发,降低了学习难度。
193193

194-
### 什么是Spring Security ?
194+
### 9. 什么是Spring Security ?
195195

196196
Spring Security 应该属于 Spring 全家桶中学习曲线比较陡峭的几个模块之一,下面我将从起源和定义这两个方面来简单介绍一下它。
197197

0 commit comments

Comments
 (0)