为啥要用SpringBoot(架构选型)
方便 集成,快速开发
Spirngboot 使编码简单,配置简单,部署简单,监控简单
Springboot 继承了Spring的优点并新增了一些新功能和特性,是伴随着Spring4.0诞生的。boot是引导的意思,因此帮助开发者快速搭建Spring框架。快速启动Web容器,继承了原有Spring框架的优秀基因,简化了使用Spring的过程,为我们带来了脚本语言的效率
SpringBoot的核心功能
独立运行Spirng项目
内嵌servlet容器
提供starter简化maven配置
自动配置spring
应用监控
SpringBoot注解启动的两种方式
第一种: @SpringBootApplication
第二种: @configuration @EnableAutoConfiguration @ComponentScan
Springboot 版本选型:
官网强烈建议用2.0
json格式化工具: https://tool.lu/json/
查看Springboot和SpringCloud版本对应: https://start.spring.io/actuator/info
"spring-cloud": {
"Finchley.M2": "Spring Boot >=2.0.0.M3 and <2.0.0.M5",
"Finchley.M3": "Spring Boot >=2.0.0.M5 and <=2.0.0.M5",
"Finchley.M4": "Spring Boot >=2.0.0.M6 and <=2.0.0.M6",
"Finchley.M5": "Spring Boot >=2.0.0.M7 and <=2.0.0.M7",
"Finchley.M6": "Spring Boot >=2.0.0.RC1 and <=2.0.0.RC1",
"Finchley.M7": "Spring Boot >=2.0.0.RC2 and <=2.0.0.RC2",
"Finchley.M9": "Spring Boot >=2.0.0.RELEASE and <=2.0.0.RELEASE",
"Finchley.RC1": "Spring Boot >=2.0.1.RELEASE and <2.0.2.RELEASE",
"Finchley.RC2": "Spring Boot >=2.0.2.RELEASE and <2.0.3.RELEASE",
"Finchley.SR4": "Spring Boot >=2.0.3.RELEASE and <2.0.999.BUILD-SNAPSHOT",
"Finchley.BUILD-SNAPSHOT": "Spring Boot >=2.0.999.BUILD-SNAPSHOT and <2.1.0.M3",
"Greenwich.M1": "Spring Boot >=2.1.0.M3 and <2.1.0.RELEASE",
"Greenwich.SR6": "Spring Boot >=2.1.0.RELEASE and <2.1.16.BUILD-SNAPSHOT",
"Greenwich.BUILD-SNAPSHOT": "Spring Boot >=2.1.16.BUILD-SNAPSHOT and <2.2.0.M4",
"Hoxton.SR6": "Spring Boot >=2.2.0.M4 and <2.3.2.BUILD-SNAPSHOT",
"Hoxton.BUILD-SNAPSHOT": "Spring Boot >=2.3.2.BUILD-SNAPSHOT and <2.4.0.M1",
"2020.0.0-SNAPSHOT": "Spring Boot >=2.4.0.M1"
},
不求与人相比,但求超越自己,要哭就哭出激动的泪水,要笑就笑出成长的性格!