SpringBoot

Spring Boot将很多魔法带入了Spring应用程序的开发之中,其中最重要的是以下四个核心。 * 自动配置:针对很多Spring应用程序常见的应用功能,Spring Boot能自动提供相关配置。 * 起步依赖:告诉Spring Boot需要什么功能,它就能引入需要的库。 * 命令行界面:这是Spring Boot的可选特性,借此你只需写代码就能完成完整的应用程序, 无需传统项目构建。 * Actuator:让你能够深入运行中的Spring Boot应用程序,一探究竟。

,从本质上来说,Spring Boot就是Spring,它做了那些没有它你自己也会去做的Spring Bean配置。

Screen Shot 2020-03-26 at 10.27.24 A Screen Shot 2020-03-26 at 10.41.09 A

Screen Shot 2020-03-26 at 10.43.26 A

Screen Shot 2020-03-26 at 10.43.59 A Screen Shot 2020-03-26 at 10.49.30 A

springboot启动流程

Screen Shot 2020-03-26 at 10.52.24 A

springboot中的常用配置application.properties Screen Shot 2020-03-26 at 10.53.07 A

spring boot 支持两种配置文件

  • 属性文件 application.properties
  • yaml格式 application.yml (推荐)

Screen Shot 2020-03-26 at 12.27.50 P