原创 IDEA提交代碼忽略文件配置
左上角 File=》Setting=》Editor=》File Types 添加 *.iml;*.idea;*.gitignore;*.sh;*.classpath;*.project;*.settings;target;*mvn;*.
原创 Linux查看某個服務JVM的GC和堆內存使用情況
一、 使用 jps 命令查看配置了JVM的服務 jps 標紅部分是進程號 二、查看某個進程JVM的GC使用情況 jstat -gc 71614 5000 jstat -gc 進程號 刷新時間 S0C:年輕代中第一個
原创 解決mysql8版本以上 連接數據庫錯誤 The server time zone value '�й���ʱ��' is unrecognized or represents more than
錯誤信息 The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configur
原创 Springboot重試機制Spring Retry
一、引入maven依賴 <dependency> <groupId>org.springframework.retry</groupId> <artifactId>spring-retry</artifactId>
原创 Linux自動清除緩存腳本,親測有效
1、cleanCache.sh 清除緩存腳本 #!/bin/bash #description: 清除緩存 echo "開始清除緩存" sync;sync;sync #寫入硬盤,防止數據丟失 #sleep 10 #延遲10秒 ec
原创 Linux關閉防火牆
1:查看防火牆狀態 systemctl status firewalld 或者 service iptables status 2:暫時關閉防火牆 systemctl stop firewalld 或者 service iptable
原创 mybatis使用truncate清空表
一、Mapper接口 void truncateTable(); 二、XML文件 <update id="truncateTable" > TRUNCATE TABLE 表名 </update> 注意: 是<upd
原创 springboot在IDEA設置熱部署
1、依賴 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId>
原创 springboot整合redis
一、POM文件 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starte
原创 Oracle查看最大連接數並修改SQL語句
一、查看最大連接數 select value from v$parameter where name = 'processes'; 二、查看當前連接數 select count(*) from v$process; 三、修改最大連接數
原创 SpringBoot統一管理依賴,子模塊只需引入需要的依賴
一。父pom配置 1、一定要使用 <dependencyManagement></dependencyManagement>標籤 2、其他正常配置:主要繼承 spring-boot-starter-parent 即可 3、記得配置<pac
原创 kafka集羣優化
優化啓動腳本 優化配置項 一、優化啓動腳本 cd /kafka_2.11-1.1.1/bin (安裝目錄) vim kafka-server-start.sh 配置JVM大小(默認是1G) 我這裏配置了 -Xmx8G -Xm
原创 CentOS -7 第一篇:VMware安裝CentOS -7
一、安裝準備 1、安裝完成VMware虛擬機 2、預留20G以上硬盤空間 3、預留1G以上內存空間 VMware虛擬機下載: https://my.vmware.com/cn/web/vmware/info/slug/desktop_en
原创 CentOS -7 第三篇:環境配置以及 yum 問題
接上一篇,安裝完後使用 vim 或者 netstat-tunlp、telnet 等命令會出現 -bash:command not found問題 這就需要使用yum 安裝相關命令包 一、VIM的 -bash: vim: command
原创 CentOS-7第二篇:防火牆問題
CentOS7的防火牆不同與舊版本,使用了firewall作爲防火牆 舊版本使用iptables防火牆 一、檢查防火牆狀態 檢查防火牆狀態:firewall-cmd --state(running爲已開啓) 或者使用 systemc