02-SpringMVC 参数映射+响应 参考资料:https://spring-mvc.linesh.tw/ 1. 请求参数映射 GET 请求参数拼接在 URL 路径上,eg: http://ip:port/project/user/get?key1=value1&key2=value2 POST 请求参数 在 请求消息体中,eg:Form Data 或 Request payload 1.1 @RequestMap 2018-06-20 08_框架技术 > 03_SpringMVC #注解 #SpringMVC #Request
01-SpringMVC Demo 参考资料:https://spring-mvc.linesh.tw/ 1. SpringMVC 概述SpringMVC 是一种基于 Java 实现 MVC 设计模型的请求驱动类型的轻量级 Web 框架。它和 Struts2 都属于表现层的框架,属于 Spring FrameWork 的后续产品,Spring MVC 分离了控制器、模型对象、过滤器以及处理程序对象的角色,这种分离让它们更容易进行定 2018-06-20 08_框架技术 > 03_SpringMVC #SpringMVC #架构
01_SpringBoot Demo 参考资料1:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html 1. SpringBoot 入门1.1 简介Spring Boot是基于约定优于配置的,主要作用就是用来简化Spring应用的初始搭建以及开发过程! 1. 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #简述 #热部署
02_SpringBoot YML 参考资料:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html 1. SpringBoot 默认配置 可以从 jar 包中找到 SpringBoot 的默认配置文件位置。 SpringBoot 是基于约定的,所以很多配置 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #配置 #YAML
03_SpringBoot 异常+日志 参考资料:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html 1. 全局异常处理SpringBoot 中的异常处理: 1.1 测试类123456789101112131415161718import com.demo. 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #日志 #异常
04_SpringBoot 过滤器+监听器 参考资料:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html SpringBoot 中 Filter 过滤器、Listener 监听器用法相同。 1. 创建过滤器12345678910111213import ja 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #过滤器 #监听器
05_SpringBoot 拦截器 参考资料:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html 1. 自定义拦截器类123456789101112131415161718192021222324252627import org.omg.Portable 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #拦截器
06_SpringBoot+MyBatis 参考资料:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html 1. 导入依赖1234567891011121314<!-- 引入mybatis相关依赖,必须写版本号 --><dependency&g 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #MyBatis
07_SpringBoot+Redis 参考资料:https://www.springcloud.cc/spring-boot.html 中文文档2:https://felord.cn/_doc/_springboot/2.1.5.RELEASE/_book/index.html 1. 导入依赖1234<dependency> <groupId>org.springframework.boot</g 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #Redis
08_SpringBoot+FreeMarker 官方文档: http://freemarker.foofun.cn/toc.html 参考资料: https://www.cnblogs.com/itdragon/p/7750903.html FreeMarker 是一款 模板引擎: 即一种基于模板和要改变的数据, 并用来生成输出文本(HTML网页,电子邮件,配置文件,源代码等)的通用工具。 它不是面向最终用户的,而是一个Java类库,是一款 2018-06-20 08_框架技术 > 04_SpringBoot #SpringBoot #FreeMarker #模板引擎