原创 java concurrent 包之 ScheduledThreadPoolExecutor

java 自帶定時任務的另一種實現 使用示例: //package com.ws.com.util; import java.util.concurrent.ScheduledThreadPoolExecutor; import ja

原创 java 連接 rabbitMq,並處理數據的例子

從我得另外一篇文章中摘抄出來: https://mp.csdn.net/postedit/103457479 rabbitMq jar版本: amqp-client-5.7.3.jar 例子: 說明一個rabbitmq 的例子,由於涉及隱

原创 Bean named 'defaultSockJsTaskScheduler' is expected to be of type 'org.springframework.scheduling.

錯誤詳情: springboot + quartz + websocket (spring 自帶得websocket 模塊) 引起的衝突問題 contextLoads(com.kzcm.higo.HigoApplicationTest

原创 動態生成google 身份驗證碼(口令)

依賴 <!-- 谷歌驗證碼 --> <dependency> <groupId>com.warrenstrange</groupId> <artifactId>googleauth</artifactId> <ve

原创 Spring HTTP Streaming

參考: https://www.jianshu.com/p/ecc6f5168aef 參考: https://www.logicbig.com/tutorials/spring-framework/spring-web-mvc/http_

原创 (mysql CST 時區問題)mysql now() 函數時間正常,系統時間正常,mysql 保存的時間值與系統時間相差13個小時

參考: https://blog.csdn.net/jovi_zhao/article/details/81484190 參考: http://www.cnblogs.com/jwentest/p/8610038.html 參考: htt

原创 springboot 手動加載redis 配置文件

場景: 如題,springboot 手動加載 配置文件中的加載文件, 本項目的redis 模塊是從另一項目中加載過來的,而另一項目使用的 <!--工具類--> <dependency> <groupId>com.xiaolei

原创 spring 設置事務回滾報: org.springframework.transaction.NoTransactionException: No transaction aspec

原文鏈接:https://blog.csdn.net/xuhaogang3/article/details/82190026 異常: org.springframework.transactio

原创 layui switch 開關根據傳入值默認選中或不選

原文鏈接:https://blog.csdn.net/zzz___bj/article/details/80324953 layui switch 開關根據傳入值默認選中或不選 參考: http

原创 freemarker 內置built-ins(翻譯爲程序)

例子 freemarker 對 Date 類型解析 freemarker 內置了很多 built-ins ,比如日期類型,直接通過 頁面 ${obj} 沒有輸出,可以通過指定 built-ins 指定日期格式,例如: ${obj?date

原创 Shiro 整合 ehcache 緩存報: Another CacheManager with same name 'test' already exists in the same VM

Shiro 整合 ehcache 緩存報錯: Factory method 'ehCacheCacheManager' threw exception; nested exception is net.sf.ehcache.CacheEx

原创 Springboot 配置 https

參考: https://www.cnblogs.com/duanxz/p/9155509.html 參考: https://blog.csdn.net/l4642247/article/details/81631770 配置文件配置:  

原创 Springboot項目啓動到一半卡住了,不報錯

1. 今天啓動項目時,啓動到一半卡住了,不報錯,開始我以爲是timeout,後來發現不是這個原因。 然後在網上找了很多資料,有些說是日誌Jar包遞歸了,可是我同事本地跑起來卻沒有錯,找了好久的原因,然後我想着重新import下pom.xm

原创 Mysql 關鍵字做爲列名,無法插入報錯

例子: 比如 key 做爲關鍵字,當做列名使用,根本就沒有很明顯的提示,後來發現錯誤是從key開始的,就把列名改了一下,就可以插入了,就懷疑 key 是mysql 關鍵字 參考: https://blog.csdn.net/xpnida

原创 SpringBoot 配置文件存放位置及讀取順序

參考: https://blog.csdn.net/mrluzle/article/details/79164342     讀取順序      如果在不同的目錄中存在多個配置文件,它的讀取順序是:         1、config/ap