SpringBoot_01_简介

SpringBoot简化了Spring应用的创建和配置,提供了自动配置、内嵌web服务器、健康检查和外部化配置等功能,是构建生产级别微服务的理想选择。文章介绍了SpringBoot的作用、优缺点,以及其在微服务和云原生时代的背景。学习SpringBoot可从官方文档入手,了解不同版本的新特性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、SpringBoot简介

1、Spring能做什么

1.1、Spring的能力

在这里插入图片描述

1.2、Spring的生态

https://spring.io/projects/spring-boot

覆盖了:web开发、数据访问、安全控制、分布式、消息服务、移动开发、批处理 …

在这里插入图片描述

1.3、Spring5重大升级

1.3.1、响应式编程

在这里插入图片描述

1.3.2、内部源码设计

基于Java8的一些新特性,如:接口默认实现。重新设计源码架构。

2、为什么用SpringBoot

作用:能快速创建出生产级别的Spring应用(帮我们整合其他的spring的框架)

SpringBoot底层是Spring Framework(spring框架),spring的底层是java

2.1、SpringBoot作用

  • 创建独立Spring应用

  • 内嵌web服务器

  • 自动starter依赖,简化构建配置(解决了整合之间jar包的版本问题

  • 自动配置Spring以及第三方功能(自动的整合其他的框架

  • 提供生产级别的监控、健康检查及外部化配置

  • 无代码生成、无需编写XML(不用再写配置文件了

SpringBoot是整合Spring生态圈技术栈的一站式框架

SpringBoot是简化Spring生态圈技术栈的快速开发脚手架(脚手架:帮我们搭建好所有的东西,只需要关注自己的业务就可以了

2.2、SpringBoot缺点

  • 人称版本帝,迭代快,需要时刻关注变化
  • 封装太深,内部原理复杂,不容易精通

3、时代背景

3.1、微服务

James Lewis and Martin Fowler (2014) 提出微服务完整概念。https://martinfowler.com/microservices/

In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.-- James Lewis and Martin Fowler (2014)

  • 微服务是一种架构风格
  • 一个应用拆分为一组小型服务
  • 每个服务运行在自己的进程内,也就是可独立部署和升级
  • 服务之间使用轻量级HTTP交互
  • 服务围绕业务功能拆分
  • 可以由全自动部署机制独立部署
  • 去中心化,服务自治。服务可以使用不同的语言、不同的存储技术

3.2、分布式

在这里插入图片描述

分布式的困难

  • 远程调用
  • 服务发现
  • 负载均衡
  • 服务容错
  • 配置管理(同一服务的服务器进行统一的配置管理)
  • 服务监控
  • 链路追踪
  • 日志管理
  • 任务调度

分布式的解决

  • SpringBoot + SpringCloud

image

3.3、云原生

原生应用如何上云。 Cloud Native

上云的困难

  • 服务自愈
  • 弹性伸缩
  • 服务隔离
  • 自动化部署
  • 灰度发布
  • 流量治理

上云的解决

image

4、如何学习SpringBoot

4.1、官网文档架构

官方网站:https://spring.io/

1、各种版本的查看

在这里插入图片描述

2、对应某个版本的学习

在这里插入图片描述

3、springboot的资源清单(到底能配置哪些东西)

在这里插入图片描述

5、查看版本新特性;

https://github.com/spring-projects/spring-boot/wiki#release-notes
image.png

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

小镇男孩~~

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

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

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

打赏作者

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

抵扣说明:

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

余额充值