Spring Boot介绍

1、简介

  • Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications that you can run. We take an opinionated view of the Spring platform and third-party libraries, so that you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.
  • Spring Boot可以轻松创建独立的,生产级的基于Spring的应用程序,你可以轻松的运行它。我们对于Spring平台和第三方库采取了这样的观点,只需要很少的步骤就可以开始使用,所以大多数Spring Boot应用只需要非常少的spring配置。
  • 官方文档:https://docs.spring.io/spring-boot/docs/2.1.4.RELEASE/reference/htmlsingle/

Spring框架越来越成熟,也更加的庞大,虽然Spring提供了很对注解去减少配置,但仍然不够。为了解决这种问题,Spring Boot诞生了。

2、优点

  • 约定优于配置,只需要很少的配置。
  • 内嵌Servlet容器,如tomcat、jetty、undertow,不需要打war包和部署tomcat,直接java -jar启动。
  • 支持yml配置文件,靠缩进控制级别,结构更加简洁。
  • 提供了各种starter便于功能的开箱即用。如mysql、MongoDB、elasticsearch等,需要注意的是,第三方版本依赖于Spring Boot的版本,如果需要使用其他版本,需在pom里显示引入。
  • 自带监控
  • 便于测试

3、版本

https://spring.io/projects/spring-boot#learn
在这里插入图片描述
使用2.1.4.RELEASE版本

4、环境要求

maven3.3+
jdk1.8+
tomcat9+
Spring Framework 5.1.6+
在这里插入图片描述

5、项目搭建

  • 使用IntelliJ IDEA(Spring Initializr)快速构建
    确定Spring Boot版本后,maven会自动下载对应的spring相关jar包
  • 修改application.properties文件,写入你需要的配置
  • 启动
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坚持是一种态度

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值