一、快速创建独立的,生产级的Spring项目,并且配置很少。
二、特点:(反正就是多方支持,兼容好,上手快各种优势) 1、创建独立的Spring应用程序 2、直接嵌入Tomcat,Jetty或Undertow(无需部署WAR文件) 3、提供自以为是的"入门"依赖项,以简化构建配置 4、尽可能自动配置Spring和3rd Party库 5、提供生产就绪的功能,例如指标,运行状况检查和外部配置 6、完全没有代码生成,也不需要XML配置
三、快速搭建demo系统 1、第一个Springboot应用程序:https://start.spring.io/ (可能回报:Empty test suite 异常,maven install -X,就能解决) 2、整合web开发 (整合 Thymeleaf 参考:https://blog.csdn.net/XiaoA82/article/details/88052450) 3、整合的源码已上传到 github:https://github.com/iFreemen/demo
四、web开发基础系统(基于官方下载的springboot的开发) 1、提前安装好JDK1.8 和 IDEA环境 2、引入Springboot后,启动test和application是否正常 3、整合web、Thymeleaf、lombok,实现基本的页面展示
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-thymeleaf org.projectlombok lombok 1.16.202、目前的项目结构
3、创建controller、entity模块。 注意注解:@Controller @GetMapping @Data @RequestParam String name
4、Application扫描包 @SpringBootApplication @ComponentScan(basePackages = {"com.example.demo"})
5、创建templates模块、Thymeleaf的默认路径就是templates下的html文件。文件名要和return中的名字保持一致,否则会报错 6、页面和后端的参数传递,详情查看源代码及注解
五、系列学习 Thymeleaf的各种类型的传递和显示 1、基础参数:http://note.youdao.com/noteshare?id=4f75162899939a27ea28f70814c665e1 实现字符串、对象在页面的展示和List的循环、在js中的显示[[${user.name}]],a 标签跳转 2、表单提交字符串、图片:http://note.youdao.com/noteshare?id=37a9750c8dae79a560f322e361bfe1bd 3、ajax提交简单数据:http://note.youdao.com/noteshare?id=9488f0107dcb6f2f47054d52e39718bd 目前就是这些简单的运用:如有需要在补充。。。。。。。(想要什么功能demo可以联系我补充:ifreemen@qq.com)
六、 整合JPA、Mybatis、redis、mongo 1、整合JPA:https://github.com/iFreemen/springBoot_Jpa 2、整合Mybatis: i、用Mybatis少不了逆向工程:https://github.com/iFreemen/mybatis_generator ii、整合Mybatis: Mybatis官方:https://mybatis.org/mybatis-3/zh/getting-started.html 在整合过程中因为用的通过Mapper依赖搞错了浪费了不少时间,留意 @MapperScan 是 tk,指定主键 @id ,返回包含主键的对象 @GeneratedValue(strategy = GenerationType.IDENTITY) 等等
tk.mybatis mapper-spring-boot-starter 2.0.2详情查看代码:https://github.com/iFreemen/demo
iii、整合Druid: 参考外部博客:https://www.jianshu.com/p/fd2c8113f79d 源码: https://github.com/iFreemen/demo 启动springboot应用,访问 http://localhost:8080/druid/index.html 进入druid数据源监控系统(Freemen Freemen) 多数据源:
iiii、整合redis:首先要先准备好redis环境:http://note.youdao.com/noteshare?id=96878ddd8ea0fded0882f90a85072f3f 工具参考:https://www.cnblogs.com/zeng1994/p/03303c805731afc9aa9c60dbbd32a323.html 源码: https://github.com/iFreemen/demo
3、整合 MongoDB:首先准备好MongoDB环境:http://note.youdao.com/noteshare?id=3ae56b5dd2d8b26101e549f33f6abb9e 注意 _id 的类型是ObjectId,另外:不用建表,mongo会自动根据写入的对象class,创建一个对应的表 源码: https://github.com/iFreemen/demo
七、整合 Excel 实现读操作,导入导出;各种文件操作:txt、XML(暂时不弄) Excel读取会遇到很多问题的:例如整型会变成带小数点的,读取单元时循环内要使用表单头,对不用的类型要分来处理 Excel导出:表头的顺序、反射导致不能用 serialVersionUID 等等 源码:https://github.com/iFreemen/demo
八、邮件发送、附件Excel 参考链接:http://note.youdao.com/noteshare?id=62000a5141c28a28cc0ea3618fe4c424 详情见源码:https://github.com/iFreemen/demo (附件的格式没做处理)
解决if-els过多的的问题===> 策略模式+工厂模式 八、队列实现:http://note.youdao.com/noteshare?id=3401da9e6fbe971a2e6834afe53aa528 九、ES(ElasticSearch):单机:http://note.youdao.com/noteshare?id=64db4221aae66cb2dbea45762e2a20f4 处理报错:http://note.youdao.com/noteshare?id=53d0ec25394ff3dd37669923434af1d3 集群ES还没尝试:待续 springboot整合ES:http://note.youdao.com/noteshare?id=ffb422e684784aa8d5381d35b87100cb
十、Springboot 整合多数据源,源码在github上 参考:https://blog.csdn.net/liuxiao723846/article/details/80461071 注解形式整合多数据源:http://note.youdao.com/noteshare?id=9838907efdbfaf47f225349dee8aa392 XML形式整合多数据源:待续
十、Dubbo+Zookepper
十一、Docker 十二、springcloud 十三、发布 十四、Jenkins 十五、日志分析、性能调优:JVM、SQL 十六、Netty,Tomcat 十七、RESTful 十八、vue等 压力测试