会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
咖喱给给啊
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
30
下一页
2022年9月13日
异常处理步骤流程
摘要: 1、执行目标方法,目标方法运行期间有任何异常都会被catch、而且标志当前请求结束;并且用 dispatchException 2、进入视图解析流程(页面渲染?) processDispatchResult(processedRequest, response, mappedHandler, mv,
阅读全文
posted @ 2022-09-13 00:18 咖喱给给啊
阅读(822)
评论(0)
推荐(0)
2022年9月12日
异常处理组件功能分析
摘要: ErrorMvcAutoConfiguration 自动配置异常处理规则 容器中的组件:类型:DefaultErrorAttributes -> id:errorAttributes public class DefaultErrorAttributes implements ErrorAttrib
阅读全文
posted @ 2022-09-12 05:11 咖喱给给啊
阅读(50)
评论(0)
推荐(0)
异常处理
摘要: 1、错误处理 默认情况下,Spring Boot提供/error处理所有错误的映射 对于机器客户端,它将生成JSON响应,其中包含错误,HTTP状态和异常消息的详细信息。对于浏览器客户端,响应一个“ whitelabel”错误视图,以HTML格式呈现相同的数据 要对其进行自定义,添加View解析为e
阅读全文
posted @ 2022-09-12 04:31 咖喱给给啊
阅读(30)
评论(0)
推荐(0)
文件上传简单分析
摘要: 文件上传自动配置类-MultipartAutoConfiguration-MultipartProperties 自动配置好了 StandardServletMultipartResolver 【文件上传解析器】 原理步骤 1、请求进来使用文件上传解析器判断(isMultipart)并封装(reso
阅读全文
posted @ 2022-09-12 03:55 咖喱给给啊
阅读(60)
评论(0)
推荐(0)
文件上传
摘要: 1、页面表单 <form method="post" action="/upload" enctype="multipart/form-data"> <input type="file" name="file"><br> <input type="submit" value="提交"> </form
阅读全文
posted @ 2022-09-12 03:05 咖喱给给啊
阅读(16)
评论(0)
推荐(0)
拦截器原理简单分析
摘要: 1.执行prehandle1方法 如果返回为true 就继续执行 prehandle2方法 prehandle2方法如果返回为true 就继续执行prehandle3方法 如果 prehandle3方法返回true 就倒叙执行 posthandle3 然后posthandle2 然后posthand
阅读全文
posted @ 2022-09-12 02:41 咖喱给给啊
阅读(412)
评论(0)
推荐(0)
拦截器的使用
摘要: //HandlerInterceptor 直接重写接口方法就能实现拦截 /** * 登录检查 * 1、配置好拦截器要拦截哪些请求 * 2、把这些配置放在容器中 */ @Slf4j public class LoginInterceptor implements HandlerInterceptor
阅读全文
posted @ 2022-09-12 01:57 咖喱给给啊
阅读(55)
评论(0)
推荐(0)
WebMvcConfigurer
摘要: @Configuration + @WebMvcConfigurer 自定义规则 比如自定义拦截器
阅读全文
posted @ 2022-09-12 01:57 咖喱给给啊
阅读(5)
评论(0)
推荐(0)
2022年9月11日
视图解析原理简单分析
摘要: 在doInvoke方法中 执行了 return KotlinDetector.isSuspendingFunction(method) ? CoroutinesUtils.invokeSuspendingFunction(method, this.getBean(), args) : method.
阅读全文
posted @ 2022-09-11 05:51 咖喱给给啊
阅读(68)
评论(0)
推荐(0)
2022年9月10日
thymeleaf抽取公共代码
摘要: 第一种方式insert是把footer的整个拿过来了 在从footer页面下的th:fragment = copy的内容 放在div中 并把copy的标签放入div中 第二种方式replace是把div替换成了th:fragment = copy的内容 并把div标签 替换成了copy的标签 第三种
阅读全文
posted @ 2022-09-10 04:56 咖喱给给啊
阅读(55)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
30
下一页
公告