springboot学习
原理初探
自动配置:
pom.xml
- spring-boot-dependencies :核心依赖在父工程中!
- 我们在写或者引入一些SPringboot依赖的时候,不需要指定版本,就因为有这些版本仓库
启动器
-
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> - 启动器:说白了就是S平日那个boot的启动场景;
- 比如spring-boot-starter-web,他就会帮我们自动导入web环境所有的依赖
- springboot会将所有的功能场景,都变成一个个的启动器
- 如果我们要使用什么功能,就只需要找到对应的启动器就可以了
浙公网安备 33010602011771号