原创 分佈式 - 各種機制瞭解下

1. 重試機制 retry 案例:httpClient 在閱讀《深入分佈式緩存:從原理到實踐》2.2章節 2.2.7 系統重發與冪等性,以httpClient爲例說明重試機制,爲了減少失敗次數,內部設計重試次數爲3次,次數在一個私有變量中

原创 Postman模擬cookie測試接口

有些接口是需要登錄後才能鏈接的,這就需要模擬cookie。這裏使用谷歌插件postman for mac,本地安裝的也行。 點開cookies,postman會自動識別域名,只要在相應的域名下面增加cookie信息即可,就是這麼簡單  

原创 Elasticsearch 7 插件

1. elasticsearch-head 可視化插件,通過瀏覽器就能看到es的集羣部署、節點、索引等信息。 注意:es在5.x版本就不再支持head插件安裝了。百度搜索可以有多種方式安裝,我這裏用的是谷歌瀏覽器安裝es-head的擴展程

原创 Java基礎-源碼:關於 jdk 部分類的源碼解讀

1. String 類 String類是final類,即是面試中經常被問到的不可變類。 (1) hashCode String str = "abc";  String str2 = new String("abc"); 以上兩種方式的S

原创 Elasticsearch 7.2.0 官方文檔學習

官網 下載地址  https://www.elastic.co/cn/downloads/elasticsearch 嘗試安裝:選擇適合你的版本下載(我的是mac os版),解壓,然後 cd到elasticsearch-7.2.0目錄下,

原创 原 Oracle 技巧總結 (三)

1. 先分組再排序 row_number() over (partition by col1 order by col2)  eg: select * , row_number() over(partition by student_id

原创 Oracle 技巧總結 (二):nvl() 函數

1. nvl 函數的妙用 當傳入參數比較多,切不要求必輸的情況下,在一個sql中即在不使用字符串拼接動態sql的情況下使用nvl函數使非必要參數 對應的 字段 作爲條件 使之失效。例如: select name, sex, address

原创 springboot + mybatis + mybatis-generator + tk.mybatis

springboot在配置mybatis-generator時遇到的坑,我用的是eclipse,以eclipse爲例 1. eclipse 先安裝下mybatis-generator插件 Help -> Install New Softw

原创 Oracle 技巧總結(一):行轉列

1. 關鍵字:listagg() within group (order by ..) oracle中行轉列 語法結構select listagg(column1, ',') within group(order by column2)

原创 nginx-1.10.2 windows下安裝與g配置

參考博客文章  http://blog.csdn.net/ajun_studio/article/details/8066550 關於nginx gzip功能   http://blog.csdn.net/ajun_studio/arti

原创 常用linux命令

1. 創建文件目錄mkdir 2. 創建文件vi [filename]eg: vi test.txt3.移動文件mv source destinationeg: mv test.txt /study重命名文件mv test.txt hel

原创 JedisCommands

import java.util.List; import java.util.Map; import java.util.Set; /** * Common interface for sharded and non-sharded

原创 MGB Mybatis Gernerator 自動生成model、mapper、xml

(使用Maven插件的一個好處是可以將Maven中的屬性使用${property}形式在generatorConfig.xml中引用。) 1. springboot + mybatis,pom.xml中配置如圖: generatorCo

原创 Quartz遇到的一些問題

報錯: org.quartz.SchedulerConfigException: Thread count must be > 0at org.quartz.simpl.SimpleThreadPool.initialize(Simple

原创 maven+cobertura+ant跨模塊單測覆蓋率統計

cobertura是統計單測覆蓋率的工具,但是一般不會使用到ant一起統計。 --父pom.xml ----web       --pom.xml ---service       --pom.xml maven+cobertura+an