![20b5de37d479a2eb3076b6a1e89b4e77.png](https://img-blog.csdnimg.cn/img_convert/20b5de37d479a2eb3076b6a1e89b4e77.png)
spring boot
什么是spring boot
官方解释是:构建任何事情。个人的使用体会是,spring boot在传统的javaee框架使用基础上进行了更高层次的封装,简化了spring和其它框架整合过程。比如springmvc hibernate jpa redis mybatis...等框架。一句话,简化之前各个框架的配置。
在idea中如何搭建环境
![7f8299f549ef314780f4b2792384bcf6.png](https://img-blog.csdnimg.cn/img_convert/7f8299f549ef314780f4b2792384bcf6.png)
新建项目
![ec8f1f3e8e9e13e50e762d2ab01110c0.png](https://img-blog.csdnimg.cn/img_convert/ec8f1f3e8e9e13e50e762d2ab01110c0.png)
填写项目数据
![9ec287eae0d0cbf48ddc08434bc6ebf9.png](https://img-blog.csdnimg.cn/img_convert/9ec287eae0d0cbf48ddc08434bc6ebf9.png)
选择需要整合使用的技术
![e405d2d9861eecd38e5731f85c825227.png](https://img-blog.csdnimg.cn/img_convert/e405d2d9861eecd38e5731f85c825227.png)
集成spring mvc
只需要选中web模块,就已经集成了spring mvc
![58fa4e9b21564711f1400878c0738e1b.png](https://img-blog.csdnimg.cn/img_convert/58fa4e9b21564711f1400878c0738e1b.png)
finish
测试
![a64e849d5097d86fdaa7c7eb87b469eb.png](https://img-blog.csdnimg.cn/img_convert/a64e849d5097d86fdaa7c7eb87b469eb.png)
新建TestController.java
![7a07d88e4278dea133de6843c09f6943.png](https://img-blog.csdnimg.cn/img_convert/7a07d88e4278dea133de6843c09f6943.png)
运行main方法启动系统
![07fed2db2273c1b64d395b54e40df409.png](https://img-blog.csdnimg.cn/img_convert/07fed2db2273c1b64d395b54e40df409.png)
启动界面很可爱
访问:http://localhost:8080/test
![e33d63bf348eec852e831d955172a45b.png](https://img-blog.csdnimg.cn/img_convert/e33d63bf348eec852e831d955172a45b.png)
spring boot配置文件
spring boot中集成其它框架技术,只需要在一个配置文件中配置。
![af944a2e76a39501377422833dc0aa4e.png](https://img-blog.csdnimg.cn/img_convert/af944a2e76a39501377422833dc0aa4e.png)
application.properties 常见配置
![580119ee6acf1077277a83e7f1521aae.png](https://img-blog.csdnimg.cn/img_convert/580119ee6acf1077277a83e7f1521aae.png)
springmvc相关配置
springmvc相关配置
![580119ee6acf1077277a83e7f1521aae.png](https://img-blog.csdnimg.cn/img_convert/580119ee6acf1077277a83e7f1521aae.png)
![1dfe038a1b358a65c246ebe7660a5eab.png](https://img-blog.csdnimg.cn/img_convert/1dfe038a1b358a65c246ebe7660a5eab.png)
http服务器相关配置
![e503b7973579a4edf82d36a00c28b788.png](https://img-blog.csdnimg.cn/img_convert/e503b7973579a4edf82d36a00c28b788.png)
jpa相关配置
![9c13a34272aad3834fb3e5a3eef0c97a.png](https://img-blog.csdnimg.cn/img_convert/9c13a34272aad3834fb3e5a3eef0c97a.png)
application.properties完整配置
关于这里面配什么,官方文档中也例举得比较全面。
![56a5f4f2ac549805eade764abfbedb95.png](https://img-blog.csdnimg.cn/img_convert/56a5f4f2ac549805eade764abfbedb95.png)
官网完整配置说明
总结
那是不是说学了spring boot就不用学习spring 和 其它框架啦?当然不是,相反,每一个技能的基本用法还是必须学习的,否则我们并不会知道springboot帮我们做了什么事情。