原创 LevelDB 初始化的 UML圖(未完結, 裏面有點小複雜)

LSM數據結構及UML圖LevelDB 初始化的 UML圖levelDB 的 put 方法:makeRoomForWrite()檢查並確保內存充足(涉及到核心的內存和文件壓縮邏輯) LevelDB 初始化的 UML圖 Iq80DBFa

原创 Trie 數據結構源碼分析(源碼來源 rt.jar)

先上圖: 如下是 Trie 數的數據結構: Trie 樹的作用:統計,排序和保存字符串 快速查找某個單詞key 所對應的 value 值(類似 Map 的功能) (擴展的時候,可以判斷某個 key 是否存在, 統計某個前綴被多少

原创 Redis is running in protected mode because protected mode is enab led

(error) DENIED Redis is running in protected mode because protected mode is enab led, no bind address was specified, n

原创 org.springframework.web.client.HttpClientErrorException: 400

異常如下: org.springframework.web.client.HttpClientErrorException: 400 at org.springframework.web.client.DefaultRespon

原创 intellij idea編輯器裏面的字母有的隱形了是爲什麼

如圖:(此圖來自百度,因爲自己解決問題前忘記截圖了) 解決方案:更換idea字體,點擊apply按鈕即可正常顯示

原创 Java垃圾收集基礎

Java垃圾收集基礎 垃圾收集算法 引用計數法 問題:存在循環依賴導致無法回收問題 標記清除法 實現方式:通過根節點標記所有可達對象,清除所有不可達對象。 問題:出現大量空間碎片 複製算法 複製算法適用於新生代,因爲在新生代垃圾對象會多

原创 Caused by: org.hibernate.jpa.boot.archive.spi.ArchiveException: Could not build ClassFile

Java8 新特性的坑: List uids = new ArrayList<>(); uids.add(“asdfa”); uids.forEach(uid->{

原创 Failed to instantiate [org.springframework.data.domain.Pageable]: Specified class is an interface

Failed to instantiate [org.springframework.data.domain.Pageable]: Specified class is an interface 解決方案: 在controller層的

原创 @jsonIgnore不生效

本人使用的是alibaba的fastjson,但是@JsonIgnore不是fastjson的,所以不生效, 將註解改爲@JSONField(serialize = false),JSONField來自com.alibaba.fastj

原创 垃圾收集器

串行垃圾收集器兩個特點; 缺點: 使用單線程進行垃圾回收 獨佔式 1、新生代串行收集器使用複製算法,沒有線程切換,適合單cpu或較小的應用內存硬件平臺,JVM在client模式下的默認收集器 2、老年代串行收集器使用標記-壓縮算法,串

原创 mybatis批量更新

MySQL沒有提供直接的方法來實現批量更新,但可以使用case when語法來實現這個功能。 UPDATE course SET name = CASE id WHEN 1 THEN ‘name1’

原创 Failed to create directory /home/tomcat/.dubbo!

FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Invalid registr

原创 fatal: Cannot update paths and switch to branch 'master' at the same time.

fatal: Cannot update paths and switch to branch ‘master’ at the same time. Did you intend to checkout ‘origin/master’

原创 VirtualBox is not installed. Please re-run the Toolbox Installer and try again.

VirtualBox is not installed. Please re-run the Toolbox Installer and try again. Looks like something went wrong in ste

原创 Can't assign requested address

Exception in thread “main” java.lang.IllegalStateException: Can’t assign requested address at com.alibaba.dubbo.re