![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
文章平均质量分 52
薛定谔的猫°
这个作者很懒,什么都没留下…
展开
-
spring data elasticsearch使用7.x客户端兼容es 8.x和使用ssl构建RestHighLevelClient
es在7.x中默认加入elastic security组件所以java client需要使用ssl连接es server.,但是spring data elasticsearch还未更新到该版本.所以需要兼容es 8.x。然后你就可以在其他bean中注入该客户端。es 8.x 中废弃了。原创 2022-08-10 23:42:37 · 2208 阅读 · 1 评论 -
JAVA按月拆分两个时间段
项目中需要按月份把时间段按月份拆开为每个月一个时间段用作统计参考自:Java将日期拆分成按周或月时间段统计 - 暖然 - 博客园 在此基础上修改后使用. public static List<Date[]> rangeMonthDate(Date sDate, Date eDate){ List<Date[]> list = new ArrayList<>(); Calendar sCalendar = Calendar..原创 2021-11-11 20:06:22 · 802 阅读 · 0 评论 -
myBatis-plus page分页插件的排序无效(failed to concat orderBy from IPage, exception=null)
主要原因是 jsqlparser 解析sql时出错,抛出异常 mybatis-plus捕获 记录了failed to concat orderBy from IPage, exception=nulllogger.warn("failed to concat orderBy from IPage, exception=" + e.getMessage());请检查sql中是否有关键字未用 ` `, 可以使用 CCJSqlParserUtil.parse(sql);来判断sql是否可以被解析.本人遇到原创 2020-06-10 11:50:56 · 3793 阅读 · 0 评论