使用@Select注解写<foreach>
发表于|更新于
|浏览量:
智慧是宝石,如果用谦虚镶边,就会更加灿烂夺目。——高尔基
只需要加<sceipt>标签就可以了
1 | @Select({"<script>" + |
相关推荐
2022-05-01
mapstruct的spring拓展
活着不一定要鲜艳,但一定要有自己的颜色。——张曙光 首先按照惯例放官网: https://mapstruct.org/documentation/spring-extensions/reference/html/ 基本的使用方式之前博客已经写过了我们就不再细表,这里简单放上链接 https://VampireAchao.github.io/2022/03/23/mapstruct/ 在此之前还要配置对应的依赖和插件 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 <properties> <java.version>1.8</java.version> <!-- 编译生成代码插件版本号开始(避免mapstruct和lombok冲突,因此此处指定一个兼容的版本) --> <lombok.version&g...
2023-01-24
spring caching
凡事必须要有统一和决断,因此,胜利不站在智慧的一方,而站在自信的一方。——拿破仑 官方文档:https://spring.io/guides/gs/caching/ 引入依赖: 1234<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId></dependency> 准备一个Book类 12345678910111213141516171819202122232425262728293031323334package com.example.caching;public class Book { private String isbn; private String title; public Book(String isbn, String title) { this.isbn = isbn; ...
2022-07-20
反射获取声明泛型工具类
和上帝一样聪明,和天才一样幼稚。——巴尔扎克《奥诺丽纳》 工具类: 1234567891011121314151617public static Type[] getGenericTypes(Type paramType) { Type type; for (type = paramType; type instanceof Class; type = ((Class<?>) type).getGenericSuperclass()) { if (Object.class.equals(type)) { Type[] genericInterfaces = ((Class<?>) type).getGenericInterfaces(); if (genericInterfaces.length > 0 && Objects.nonNull(genericInterfaces[0])) { ...
2022-09-11
hutool excel写数据
为人但知足,何处不安生——耶律楚材 依赖见:hutool获取excel中的图片 代码如下: 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051package com.ruben;import cn.hutool.core.collection.CollUtil;import cn.hutool.core.date.DateUtil;import cn.hutool.poi.excel.ExcelUtil;import cn.hutool.poi.excel.ExcelWriter;import java.util.ArrayList;import java.util.LinkedHashMap;import java.util.Map;/** * ExcelDemo * * @author VampireAchao * @since 2022/9/7 */public class ExcelDemo { public stat...
2021-06-17
字符和Ascii码的互转
对我们帮助最大的,并不是朋友们的实际帮助,而是我们坚信得到他们的帮助的信念。——伊壁鸠鲁 我们可以使用多种方式去获取一个字符的ascii码 1234System.out.println(new Character('A').hashCode());System.out.println(Character.hashCode('A'));System.out.println((int) 'A');System.out.println((int) new Character('A')); 也可以反过来通过ascii码获取对应的字符 1234System.out.println((char) 65);System.out.println(new Character((char) 65));System.out.println((Character) (char) 65);System.out.println((Character) (char) (int) new Integer(65)); 其实...
2024-01-22
stream-query的BeanHelper拷贝支持Converter
锲而舍之,朽木不折;锲而不舍,金石可镂。——荀子 这还是个实验性功能,首先引入: 12345<dependency> <groupId>org.dromara.stream-query</groupId> <artifactId>stream-plugin-mybatis-plus</artifactId> <version>2.1.0-alpha</version></dependency> 然后对应的单元测试: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211...

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