会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
durtime
H I ~ ~
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
15
16
17
18
19
20
21
22
23
···
46
下一页
2021年10月2日
spboot文件上传
摘要: 文件上传 页面表单 <form method="post" action="/upload" enctype="multipart/form-data"> <input type="file" name="file"><br> <input type="submit" value="提交"> </f
阅读全文
posted @ 2021-10-02 19:55 durtime
阅读(73)
评论(0)
推荐(0)
2021年10月1日
springboot拦截器原理
摘要: 1、根据当前请求,找到HandlerExecutionChain【可以处理请求的handler以及handler的所有 拦截器】 2、先来顺序执行 所有拦截器的 preHandle方法 1、如果当前拦截器prehandler返回为true。则执行下一个拦截器的preHandle 2、如果当前拦截器返
阅读全文
posted @ 2021-10-01 20:10 durtime
阅读(272)
评论(0)
推荐(0)
2021年9月30日
springboot配置拦截器
摘要: /** * 1、编写一个拦截器实现HandlerInterceptor接口 * 2、拦截器注册到容器中(实现WebMvcConfigurer的addInterceptors) * 3、指定拦截规则【如果是拦截所有,静态资源也会被拦截】 */ @Configuration public class A
阅读全文
posted @ 2021-09-30 17:46 durtime
阅读(61)
评论(0)
推荐(0)
HandlerInterceptor 接口
摘要: HandlerInterceptor 接口 /** * 登录检查 * 1、配置好拦截器要拦截哪些请求 * 2、把这些配置放在容器中 */ @Slf4j public class LoginInterceptor implements HandlerInterceptor { /** * 目标方法执行
阅读全文
posted @ 2021-09-30 13:51 durtime
阅读(65)
评论(0)
推荐(0)
2021年9月28日
自动配置thymeleaf
摘要: 自动配置thymeleaf @Configuration(proxyBeanMethods = false) @EnableConfigurationProperties(ThymeleafProperties.class) @ConditionalOnClass({ TemplateMode.cl
阅读全文
posted @ 2021-09-28 21:08 durtime
阅读(104)
评论(0)
推荐(0)
2021年9月27日
视图解析原理流程
摘要: 视图解析原理流程 1、目标方法处理的过程中,所有数据都会被放在 ModelAndViewContainer 里面。包括数据和视图地址 2、方法的参数是一个自定义类型对象(从请求参数中确定的),把他重新放在 ModelAndViewContainer 3、任何目标方法执行完成以后都会返回 ModelA
阅读全文
posted @ 2021-09-27 20:02 durtime
阅读(102)
评论(0)
推荐(0)
2021年9月26日
视图解析与模板引擎
摘要: 视图解析与模板引擎 视图解析:SpringBoot默认不支持 JSP,需要引入第三方模板引擎技术实现页面渲染。 使用 模板引擎-Thymeleaf
阅读全文
posted @ 2021-09-26 20:15 durtime
阅读(85)
评论(0)
推荐(0)
2021年9月25日
自定义 MessageConverter
摘要: 自定义 MessageConverter 实现多协议数据兼容。json、xml、x-guigu 0、@ResponseBody 响应数据出去 调用 RequestResponseBodyMethodProcessor 处理 1、Processor 处理方法返回值。通过 MessageConverte
阅读全文
posted @ 2021-09-25 18:25 durtime
阅读(121)
评论(0)
推荐(0)
2021年9月24日
内容协商原理
摘要: 内容协商原理 1、判断当前响应头中是否已经有确定的媒体类型。MediaType 2、获取客户端(PostMan、浏览器)支持接收的内容类型。(获取客户端Accept请求头字段)【application/xml】 contentNegotiationManager 内容协商管理器 默认使用基于请求头的
阅读全文
posted @ 2021-09-24 19:33 durtime
阅读(123)
评论(0)
推荐(0)
2021年9月23日
sp的内容协商
摘要: 内容协商 根据客户端接收能力不同,返回不同媒体类型的数据。 引入xml依赖 <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-xml</artifactId>
阅读全文
posted @ 2021-09-23 19:24 durtime
阅读(72)
评论(0)
推荐(0)
上一页
1
···
15
16
17
18
19
20
21
22
23
···
46
下一页
公告