原创 spring cloud config + bus + rabbitmq

一、config-server 1、pom配置         <!--boot版本和cloud版本-->         <spring.boot.version>2.1.5.RELEASE</spring.boot.versio

原创 jstack: Java佔用高CPU分析之- C2 Compiler Thread

記錄一次jmeter測試時出現cpu抖動 使用top查看cpu使用率:top 使用top -H -p <pid> 查看現場使用率:top -H -p 3658  使用jstack查看線程:jstack 3658| grep `prin

原创 ApplicationListener是如何生效的

SpringApplication的屬性 private List<ApplicationListener<?>> listeners;   // org.springframework.boot.SpringApplicatio

原创 springboot啓動分析

springboot啓動分析 一、啓動類  @SpringBootApplication public class SpringBootStudyApplication { public static void main(

原创 Spring Security @EnableWebSecurity 註解原理分析

1.@EnableWebSecurity 2.@Import(WebSecurityConfiguration) 3.WebSecurityConfiguration是一個配置類@Configuration 4.進入@AutoWired方

原创 線程池設置

線程池設置 線程多 提高cpu利用率 線程少 減少上下文切換 高併發 執行時間短 :線程少 低併發 執行時間長 :(cpu密集型:cpu核數+1)線程少;(io密集型)線程多 高併發 執行時間長 :拆分成(高併發 執行時間短)和(低併發

原创 Springboot 使用 Logback 自動同步指定級別日誌到 Mysql 數據庫

https://github.com/xiaobingzhou/log-db

原创 AbstractApplicationContext.refresh()

==============abstractApplicationContext.refresh======================== prepareRefresh obtainFreshBeanFactory(創建BeanFa

原创 Java BlockingQueue methods

BlockingQueue方法有四種形式,其處理操作的方式不同,不能立即滿足,但可能在將來某個時候滿足: 第一種方法拋出異常 第二種方法返回特殊值(根據操作的不同,可以爲null或false) 第三種在操作成功之前無限期阻塞當前線程 第

原创 配置Let's Encrypt的https證書

配置Let's Encrypt的https證書 1、下載解壓 $ cd /root $ wget https://github.com/certbot/certbot/archive/master.zip $ unzip master

原创 google chrome 書籤備份

Bookmarks   書籤欄   設計模式   NB平臺   管理控制檯 消息中心 OneNET -中國移動物聯網開放平臺 IoT Platform-開發文檔 管理控制檯-華爲雲 IoT平臺-華爲雲 IoT平臺基礎版(IoT Hub)_

原创 jedispool 連接耗盡 線程阻塞

 使用jstack查看到線程資源耗盡,線程被jedispool阻塞 解決方法 :配置poolConfig的maxWaitMillis爲1000 <bean id="poolConfig" class="redis.client

原创 spring-context jar 依賴關係

spring-context     spring-aop         spring-beans         spring-core     spring-beans         spring-core     spring

原创 mysql5.7之後使用 group by 會出現 only_full_group_by

 mysql5.7之後使用 group by 會出現 only_full_group_by ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MyS