mybatis中@MapKey
发表于|更新于
|浏览量:
和睦的家庭空气是世上的一种花朵,没有东西比它更温柔,没有东西比它更适宜于把一家人的天性培养得坚强正直。——德莱塞
继续分享mybatis的知识点:
@MapKey注解:org.apache.ibatis.annotations.MapKey
1 | @MapKey("id") |
得到:Map<ID, 用户>

非常的简单
相关推荐
2022-10-06
编写mybatis脱敏插件
错误是不可避免的,但是不要重复错误——周恩来 首先贴成品链接:https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/275 使用方式: 在你的vo或者po/do上添加注解@Desensitization可指定预设类型type为:cn.hutool.core.util.DesensitizedUtil.DesensitizedType例如 12@Desensitization(type = DesensitizedUtil.DesensitizedType.EMAIL)private String email; 也可自定义正则表达式 12@Desensitization(regex = "(?<=\\d{3})\\d(?=\\d{4})")private String mobile; 还可以自定义处理器进行处理 12@Desensitization(handler = MyDesensitizedHandler.class)private String myFie...
2021-01-15
maven依赖的小坑
说谎话的人所得到的,就只即使觉说直话也没有人相信。——伊索 今天引入spire.doc依赖时遇到一个小坑 提示Could not find artifact e-iceblue:spire.doc.free:pom:3.9.0 in aliyunmaven (https://maven.aliyun.com/repository/public) 可是我明明已经配置了 1234<repository> <id>com.e-iceblue</id> <url>http://repo.e-iceblue.cn/repository/maven-public/</url></repository> 后来发现原来是我maven的配置文件settings.xml是这么写的 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162...
2023-07-25
apache-incubator-streampark源码编译本地运行(五)
相信谎言的人必将在真理之前毁灭。——赫尔巴特 今天是这个报错 是install完成后,console提示shaded包下面类找不到 此时我们需要mvn clean下项目,然后取消勾选右侧的shaded模块 最后关闭项目,删除目录下的.idea文件夹,重新打开,install 再次运行即可
2023-09-23
sms4j对接阿里云短信
迷信、愚昧和虚伪腰缠万贯,但真理一直是一个乞丐。——马丁·路德 开通服务:新手指引_短信服务-阿里云帮助中心 首先安装: 12345<dependency> <groupId>org.dromara.sms4j</groupId> <artifactId>sms4j-spring-boot-starter</artifactId> <version>${sms4j.version}</version></dependency> 然后配置: 12345678910111213141516171819202122232425sms: # 标注从yml读取配置 config-type: yaml is-print: false blends: # 自定义的标识,也就是configId这里可以是任意值(最好不要是中文) aliyun: # 厂商标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分 supplie...
2021-10-23
ThreadLocal子线程共享
世人缺乏的是毅力,而非气力。——雨果 昨天聊了ThreadLocal可以用作单个线程中变量共享 其底层实现其实就是个Map,用线程作为key,不信可以看这部分源码: 123456789101112131415161718192021/** * Returns the value in the current thread's copy of this * thread-local variable. If the variable has no value for the * current thread, it is first initialized to the value returned * by an invocation of the {@link #initialValue} method. * * @return the current thread's value of this thread-local */public T get() { Thread t = Thread.currentThr...
2022-08-23
stream实现递归封装
上帝等待着人类在智慧中获得新的童年。──泰戈尔 分享一个封装的树处理,源码在这:https://gitee.com/VampireAchao/stream-query 使用方式: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123@Testvoid testToTree() { Consumer<Object> test = o -> { List<Student> studentTree = Steam .of(...

阿超
我的名字叫阿超 年龄25岁 家在北京市 职业是软件开发 每天最晚也会在八点前回家 不抽烟 酒浅尝辄止 晚上十二点上床 保证睡足八个小时 睡前写一篇博客 再做二十分钟俯卧撑暖身 然后再睡觉 基本能熟睡到天亮 像婴儿一样不留下任何疲劳和压力 就这样迎来第二天的早晨 健康检查结果也显示我很正常 我想说明我是一个不论何时都追求内心平稳的人 不拘泥于胜负 不纠结于烦恼 不树立使我夜不能寐的敌人 这就是我在这社会的生活态度
Follow Me公告
This is my Blog