摘要: @Test public void test() throws Exception{ Map<String, Object> content = new HashMap<>(); content.put("list", Lists.newArrayList(new PersonDO("100001" 阅读全文
posted @ 2021-10-19 00:02 yang希军 阅读(393) 评论(0) 推荐(0)
摘要: ThreadLocal > 当调用set(Object value)方法时, 1. 获取当前线程的ThreadLocalMap【用的子类Entry,可以直接理解为就是一个Map】 (key: Threadlocal(当前threadlcoal对象); value: Object(要设置的值)) [为 阅读全文
posted @ 2021-08-23 22:08 yang希军 阅读(65) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-07-13 11:27 yang希军 阅读(20) 评论(0) 推荐(0)
摘要: 所遇到的问题: 1. 使用datatable.js 异步渲染表格内容时(配置 processing: true),当点击下拉条内的 checkbox按钮,会导致表头缩至隐藏; 2. 方案: 当ajax请求完成,设置(加载div) 样式 margin-top: 0px; 阅读全文
posted @ 2021-06-17 16:05 yang希军 阅读(216) 评论(0) 推荐(0)
摘要: 1. 原理: 无非就是基于mybaits插件机制,拦截执行过程中某个阶段(Executor, StatementHandler, ParamterStatementHander,ResultSetHandler), 获取到待执行SQL, 利用反射对SQL重新赋值 (拼接上分页参数); 2. SQL触 阅读全文
posted @ 2021-06-05 10:37 yang希军 阅读(294) 评论(0) 推荐(0)
摘要: 1. 自定义注解 @MyTransaction /** * @author yangxj * @see org.springframework.transaction.annotation.SpringTransactionAnnotationParser * @see org.springfram 阅读全文
posted @ 2021-06-03 11:24 yang希军 阅读(418) 评论(0) 推荐(0)
摘要: 1. 实体类 @Datapublic class Person { private Long id; private String name;} 2. SQL <select id="getNameById" resultType="com.entity.Person"> select name f 阅读全文
posted @ 2021-03-28 22:26 yang希军 阅读(99) 评论(0) 推荐(0)
摘要: 背景 1.1 一个SQL查询 比如下面的 <sql id="selectCount"> select count(*) from `user` <where> <if test="names != null and names.size > 0"> name in ( <foreach collec 阅读全文
posted @ 2021-03-26 11:32 yang希军 阅读(127) 评论(0) 推荐(0)
摘要: 模拟一个需求, 接口调用时,打一下日志 1. 定义一个注解 1 @Target({ElementType.TYPE, ElementType.METHOD}) 2 @Retention(RetentionPolicy.RUNTIME) 3 public @interface TraceLog { 4 阅读全文
posted @ 2021-01-24 12:31 yang希军 阅读(1521) 评论(0) 推荐(0)
摘要: <input type="hidden" id="title" value="$!{map.dto.title}" name="title"/> // 隐藏 $('#title').select2({ placeholder: "销方名称", minimumInputLength: 2, maxim 阅读全文
posted @ 2020-10-22 18:51 yang希军 阅读(628) 评论(0) 推荐(0)