会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xy7112
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
3
4
5
6
7
8
9
10
11
···
13
下一页
2022年7月3日
spring 23 @ControllerAdvice 之 @InitBinder
摘要: 准备 @InitBinder 准备 @InitBinder 在整个 HandlerAdapter 调用过程中所处的位置 sequenceDiagram participant adapter as HandlerAdapter participant bf as WebDataBinderFacto
阅读全文
posted @ 2022-07-03 16:51 xy7112
阅读(37)
评论(0)
推荐(0)
2022年7月2日
spring 22 对象绑定与类型转换
摘要: 底层第一套转换接口与实现 classDiagram Formatter --|> Printer Formatter --|> Parser class Converters { Set~GenericConverter~ } class Converter class ConversionServ
阅读全文
posted @ 2022-07-02 16:22 xy7112
阅读(100)
评论(0)
推荐(0)
spring 21 参数名解析
摘要: 两种方法获取参数名 如果编译时添加了 -parameters 可以生成参数表, 反射时就可以拿到参数名 如果编译时添加了 -g 可以生成调试信息, 但分为两种情况 普通类, 会包含局部变量表, 用 asm 可以拿到参数名 接口, 不会包含局部变量表, 无法获得参数名 这也是 MyBatis 在实现
阅读全文
posted @ 2022-07-02 15:19 xy7112
阅读(33)
评论(0)
推荐(0)
二叉树的层序遍历
摘要: 来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/binary-tree-level-order-traversal 给你二叉树的根节点 root ,返回其节点值的 层序遍历 。 (即逐层地,从左到右访问所有节点)。 点击查看代码 示例 1: 输入:ro
阅读全文
posted @ 2022-07-02 11:29 xy7112
阅读(24)
评论(0)
推荐(0)
N 叉树的前序遍历
摘要: 来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/n-ary-tree-preorder-traversal 给定一个 n 叉树的根节点 root ,返回 其节点值的 前序遍历 。 n 叉树 在输入中按层序遍历进行序列化表示,每组子节点由空值 null
阅读全文
posted @ 2022-07-02 10:57 xy7112
阅读(34)
评论(0)
推荐(0)
2022年7月1日
LocalDateTime 与 CountDownLatch 使用
摘要: 1.LocalDateTime 获取当前时间 LocalDateTime.now() 获取当前时间毫秒值 LocalDateTime.now().toEpochSecond(ZoneOffset.UTC) 设置指定格式 LocalDateTime.now().format(DateTimeForma
阅读全文
posted @ 2022-07-01 22:54 xy7112
阅读(53)
评论(0)
推荐(0)
spring 20 参数解析器
摘要: 初步了解 RequestMappingHandlerAdapter 的调用过程 控制器方法被封装为 HandlerMethod 准备对象绑定与类型转换 准备 ModelAndViewContainer 用来存储中间 Model 结果 解析每个参数值 点击查看代码 private static voi
阅读全文
posted @ 2022-07-01 21:48 xy7112
阅读(71)
评论(0)
推荐(0)
2022年6月29日
Java 函数式调用
摘要: 在建立工具类时,由于不指定相关参数与返回值常用 R 来代表任意类型变量,用 Function<参数,返回值> 来代表不确定的函数。 示例 //<R,ID> 定义任意类型 R、ID,返回值类型是 R //ID id 代表传入任意类型参数 id //Function<ID,R> f 代表传入的函数(方法
阅读全文
posted @ 2022-06-29 22:04 xy7112
阅读(36)
评论(0)
推荐(0)
2022年6月27日
最长回文串
摘要: 来源:力扣(LeetCode) 链接:https://leetcode.cn/problems/longest-palindrome 给定一个包含大写字母和小写字母的字符串 s ,返回 通过这些字母构造成的 最长的回文串 。 在构造过程中,请注意 区分大小写 。比如 "Aa" 不能当做一个回文字符串
阅读全文
posted @ 2022-06-27 22:36 xy7112
阅读(37)
评论(0)
推荐(0)
tips @PropertiesSource
摘要: 在 spring 中使用 AnnotationConfigServletWebServerApplicationContext 时用 @PropertySource 注入绑定默认只支持xml或properties, 如果配置文件是 yaml 的需要加上工厂属性 factory = YamlPrope
阅读全文
posted @ 2022-06-27 17:46 xy7112
阅读(28)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
13
下一页
公告