随笔分类 -  JAVA

上一页 1 2 3 4 5 6 7 ··· 19 下一页
JAVA一些常用的方法
摘要:Invocation of init method failed; nested exception is ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, rea 阅读全文
posted @ 2023-04-03 10:22 yvioo 阅读(507) 评论(0) 推荐(0) 编辑
摘要:java.io.IOException: listener timeout after waiting for [30000] ms at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:905 阅读全文
posted @ 2023-03-31 20:10 yvioo 阅读(791) 评论(0) 推荐(0) 编辑
摘要:ApplicationContext.publishEvent 是Spring提供的解耦的一种方式 (基于内存)。同样可以使用 MQ 组件 / 线程池 代替。 参数类 NotifyEvent.java import lombok.AllArgsConstructor; import lombok.D 阅读全文
posted @ 2023-03-28 14:06 yvioo 阅读(1037) 评论(0) 推荐(0) 编辑
摘要:标题 # 一级标题 ## 二级标题 ### 三级标题 备注:一个#代表一级标题,2个#代表二级标题,依次类推支持6级标题,切记#和文字之间有个空格 字体 加粗 内容左右各两个* **我是加粗字体** 斜体 内容左右各一个* *我是斜体* 斜体和加粗 内容左右3个* ***我是加粗的斜体内容*** 删 阅读全文
posted @ 2023-03-24 16:17 yvioo 阅读(63) 评论(0) 推荐(0) 编辑
摘要:没有的话就引入依赖 <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.10.1</version> </dependency> 阅读全文
posted @ 2023-03-23 09:45 yvioo 阅读(517) 评论(0) 推荐(0) 编辑
摘要:List<JsonDTO> jsonDTOList = gson.fromJson(jsonStr, new TypeToken<List<JsonDTO>>() { }.getType()); JsonDTO:要转换的集合的对象 jsonStr:要转换的json字符串 阅读全文
posted @ 2023-03-15 17:30 yvioo 阅读(782) 评论(0) 推荐(0) 编辑
摘要:/** * 获取的占位符内容:现在是{} * @param str 模板数据 * @return */ public static List<String> getTemplatePlaceholder(String str) { String pattern = "\\{([^}]*)\\}"; 阅读全文
posted @ 2023-03-02 16:51 yvioo 阅读(430) 评论(0) 推荐(1) 编辑
摘要:es6版本 java取值 long count = search.getHits().getTotalHits(); es7版本 java取值 long count = search.getHits().getTotalHits().value; 如果是使用的jest框架的话 写法是 SearchR 阅读全文
posted @ 2023-02-15 15:38 yvioo 阅读(222) 评论(0) 推荐(0) 编辑
摘要:这里的currentTypePriority 表示当前移动的排序值 nextTypePriority表示移动结束后的后一个排序值 比如 1、2、3、4、5 这对应的排序值也是一样 那么2要移动到5前面 =》1、3、4、2、5 那么这里的 currentTypePriority:2对应的排序值 nex 阅读全文
posted @ 2023-02-13 18:16 yvioo 阅读(472) 评论(0) 推荐(0) 编辑
摘要:语法 "script": { "lang": "", "source": "", "params": { ... } } lang:指定编写脚本的语言。默认为painless.source:source为脚本本身params:指定作为变量传递到脚本中的任何命名参数。 批量修改 POST 索引名称/_ 阅读全文
posted @ 2023-02-03 14:13 yvioo 阅读(1863) 评论(0) 推荐(0) 编辑
摘要:放到resources/xls/import-template.xls 这个路径可以自己修改 代码同步修改即可 @GetMapping(value = "/downloadXls") @ApiOperation(value = "下载导入模板") public void downloadXls(Ht 阅读全文
posted @ 2023-01-31 17:58 yvioo 阅读(1136) 评论(0) 推荐(0) 编辑
摘要:<!--AES加密--> <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-ext-jdk16</artifactId> <version>1.45</version> </dependency> 工具类 AesU 阅读全文
posted @ 2023-01-28 16:55 yvioo 阅读(513) 评论(0) 推荐(0) 编辑
摘要:依赖,根据需要放入 <dependency> <groupId>org.eclipse.paho</groupId> <artifactId>org.eclipse.paho.client.mqttv3</artifactId> <version>1.2.5</version> </dependen 阅读全文
posted @ 2023-01-17 17:41 yvioo 阅读(1456) 评论(0) 推荐(0) 编辑
摘要:distinctFieldName 就是去重字段,这个字段必须是keyword类型 不然会报错 //指定去重字段 CollapseBuilder collapseBuilder = new CollapseBuilder(distinctFieldName); // 查询去重后的结果数量 Cardi 阅读全文
posted @ 2023-01-13 10:46 yvioo 阅读(6106) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 19 下一页
点击右上角即可分享
微信分享提示