原创 關於Oracle時間排序分頁的問題

order by createTime desc 增加rownum order by createTime desc, rownum desc  

原创 logstash jdbc_driver_library問題

mysql問題: com.mysql.jdbc.Driver not loaded. Are you sure you've included the correct jdbc driver in :jdbc_driver_library

原创 springboot使用jestClient整合elasticsearch

使用Jest client pom.xml <!--jest--> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artif

原创 正則匹配字符串最後一個逗號,不是逗號不匹配

正則匹配字符串最後一個逗號,不是逗號不匹配: ,$ 匹配最後一個逗號 最後一個不是逗號不匹配 需要匹配其他字符可以把逗號替換掉 匹配最後一個數字,不是數字不匹配 \d$ 匹配最後一位包括下劃線的任何單詞字符 ,不是的不匹配 \w

原创 Elasticsearch中的嵌套查詢介紹及實例

大家在工作中想必也接觸過Elasticsearch,今天介紹一下es中的嵌套對象及對應的查詢方式。   從考慮一個業務場景開始吧,業務上需要把某些類似的商品聚合成爲一個關聯組,需要支持根據某個商品的特徵,查詢到它所在的關聯組,es中的存儲

原创 Spring Boot使用@Async異步多個結果集合並

以我的搜索功能爲例,多個搜索結果合併 異步類:AsyncService import java.util.concurrent.Future; import org.springframework.scheduling.annotat

原创 Linux和Windows下elasticsearch安裝和使用ik分詞器

下載IK分詞器:https://github.com/medcl/elasticsearch-analysis-ik/releases 必須跟elasticsearch版本一致,可以選擇版本下載,沒有對應版本可以翻頁找找看  開始安裝

原创 spring cloud修改zipkin頁面文字

解壓項目中zipkin-ui-1.28.0.jar,版本號可能不一樣 將zipkin-ui文件夾複製到項目resource中 修改app-7c5230d2db0e102ed853.min.js文件,文件名可能不一樣,裏面只有一個js 修改

原创 java中獲取url路徑下文件MD5值的方法

獲取url路徑下的文件md5值,JAVA自帶的commons-codec包就提供了獲取16進制MD5值的方法。 import java.io.IOException; import java.io.InputStream; import

原创 logstash-input-http用戶名和密碼方式請求

logstash.conf配置 input { http { # 類型,用於判斷 type => "desktop_message" host => "68.61.113.52" port => "9601"

原创 Logstash Aggregate使用聚合問題

問題:Logstash Aggregate使用聚合,發現數組中的數據會錯亂覆蓋 原因:過濾器默認是多線程運行,所以聚合數據會錯亂 官網原話:https://www.elastic.co/guide/en/logstash/current/

原创 logstash-input-mongodb離線包安裝

離線包下載地址https://download.csdn.net/download/u011974797/12317270 logstash離線包安裝命令: Windows:logstash-plugin install file:///

原创 JestClient多條件查詢BoolQueryBuilder問題

使用BoolQueryBuilder BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery(); queryBuilder.should(QueryBuilders.matchQ

原创 Could not create the view: An unexpected exception was thrown.問題解決

打開Myeclipse10的時候,發現server窗口報錯,問題如標題,然後下方出現了一堆錯誤 java.lang.NullPointerException at com.genuitec.eclipse.ast.deploy.

原创 Springboot使用FastJson後,接口返回中文亂碼的問題解決

import java.util.ArrayList; import java.util.List; import org.springframework.context.annotation.Configuration; import