上一页 1 2 3 4 5 6 ··· 10 下一页

2023年8月18日

mybatis 中 实体类字段为 month SQL 会报错的问题

摘要: 因为 month 是 mysql 的关键字 ,所以 你的实体类字段改成 months months months months months months就行了 阅读全文

posted @ 2023-08-18 12:06 王半仙儿的博客 阅读(65) 评论(0) 推荐(0)

list 中的Stream 累加操作

摘要: ublic class Test { public static void main(String[] args) { double sum = 860.10 + 1808.09; double sum1 = 1808.09 + 860.10; // output is 2668.19 System 阅读全文

posted @ 2023-08-18 10:25 王半仙儿的博客 阅读(95) 评论(0) 推荐(0)

2023年8月17日

关于没使用Mybatis 分页,分页sql默认执行count(0) 的问题

摘要: 之前的Impl 的方法 :selectFromList(String uid, Integer pageNum, Integer pageSize) 之后的Impl 的方法 :selectFromList(String uid, Integer startPageNum, Integer pageS 阅读全文

posted @ 2023-08-17 16:15 王半仙儿的博客 阅读(488) 评论(0) 推荐(0)

2023年8月14日

Ambiguous Mapping 的处理方法

摘要: 出现原因:两个不同的Controller 中出现相同映射路径 eg: AController:/v1/wdnmd/userList/list BController:/v1/wdnmd/userList/list 就会出现此问题 阅读全文

posted @ 2023-08-14 11:41 王半仙儿的博客 阅读(233) 评论(0) 推荐(0)

2023年8月10日

Mysql 不用Json存储 List<Long>的方式

摘要: public static void main(String[] args) { List<Long> idList = new ArrayList<>(); for (int i = 0; i < 20; i++) { idList.add(Long.valueOf(i)); } String i 阅读全文

posted @ 2023-08-10 11:18 王半仙儿的博客 阅读(58) 评论(0) 推荐(0)

2023年8月9日

@Builder 是建造者模式

摘要: 待会再看 是lombok的 阅读全文

posted @ 2023-08-09 11:46 王半仙儿的博客 阅读(9) 评论(0) 推荐(0)

2023年3月27日

IDEA-实时显示当前所在类及方

摘要: 有时候用GIT对比文件修改过大,没法同步修改的时候,这个操作方式就变得极为有用。接下来就是是实操。 1 view 2 Active Editor 3 勾上show Breadcrumbs 4 看IDEA的左下角 5 设置完不好使重启一下(一般来说都直接显示) 前面是类 后面是方法 五连鞭完事 阅读全文

posted @ 2023-03-27 11:08 王半仙儿的博客 阅读(855) 评论(0) 推荐(0)

2022年12月14日

@RequestBody中传递json里的对象,对象包含list属性,对应body里的格式

摘要: 以下就是对应格式,直接复制进接口文档相关工具即可{ "userId": "88", "openCostCenterDTO": [ { "name": "大斯温例果取向", "code": "55", "costCenterCode": "35", "parentCostCenterItemCode" 阅读全文

posted @ 2022-12-14 15:39 王半仙儿的博客 阅读(1264) 评论(0) 推荐(0)

2022年11月8日

同一块石头搬到了两次的List<Map> 转List<dto>的问题

摘要: 不多比比 it is shame to talking about this List<Map<String, Object>> maps = reader.readAll(); List<UploadData> collect = maps.stream().map(m -> new Upload 阅读全文

posted @ 2022-11-08 16:10 王半仙儿的博客 阅读(103) 评论(0) 推荐(0)

2022年3月9日

Java如何防御XSS攻击?

摘要: Q1.什么是XSS攻击? 定义很多,这里我找一个比较详细的解释 https://www.cnblogs.com/csnd/p/11807592.html Q2.为什么会有XSS攻击 也看上面的链接 Q3.Java后端如何防御XSS攻击 方法:将前端请求(HttpServletRequest)的所有数 阅读全文

posted @ 2022-03-09 10:34 王半仙儿的博客 阅读(3274) 评论(0) 推荐(1)

上一页 1 2 3 4 5 6 ··· 10 下一页

导航