原创 mybatis支持的註釋

正常註釋(建議使用) <!-- 註釋內容 -->   在mybatis中 postgre數據庫,我使用了以下注釋也沒問題 --註釋內容   mysql中註釋(未嘗試在mybatis中使用以下注釋) 1. #註釋內容 2. --

原创 Java中將Html轉圖片

方式一 引入Html2Image的Maven依賴 <dependency> <groupId>com.github.xuwei-k</groupId> <artifactId>html2image</artifactId>

原创 聚合函數 postgre的string_agg、array_agg 和Oracle的WM_CONCAT、LISTAGG 和 Mysql的GROUP_CONCAT

  一、PostgreSQL 函數說明 array_agg(expression) 把表達式變成一個數組 一般配合 array_to_string() 函數使用 string_agg(expression, delimiter) 直接

原创 Windows 下Tomcat中文亂碼解決

一、控制檯亂碼 1、問題: 2、問題原因: windows默認編碼集爲GBK,由於使用startup.bat啓動tomcat時,它會讀取catalina.bat的代碼並打開一個新窗口運行。打開的cmd默認編碼可能不是utf-8,與系統編

原创 locate: 未找到命令

在學習Linux(CentOS7)文件搜索命令:locate 時,遇到錯誤“locate: 未找到命令”。 原因:CentOS7默認沒有安裝該命令 解決方案: 1、安裝"locate"命令即可。在聯網狀態運行“yum instal

原创 SSM框架使用JUnit進行單元測試

Maven工程的pom.xml文件中需要添加JUnit4依賴,例如之前我們的工程中pom.xml有如下描述: <!-- 添加junit4依賴 --> <dependency> <groupId>junit</

原创 java使用ftp案例

讀取ftp圖片 //圖片所在位置 String picUrl = "./paperpic"; logger.info(picUrl); //圖片名稱 String picName = "paper_001.Jpg"; respon

原创 C3P0報APPARENT DEADLOCK!!!

  問題: 從A服務器複製到B服務器之後,在B服務器上啓動tomcat就出現了這個問題,項目在本地是沒有問題的。 錯誤信息: [cn.wifiedu.core.service.impl.InitServiceImpl] - dateb

原创 聯想z510筆記本拆機

一、硬件升級 正面 背面 先把橡膠墊摳出來(看下圖,注意方向)。 可以先拆下4+3+3 總共 10顆螺絲。 後殼螺絲卸下後,用髮卡翹起鍵盤。 拆鍵盤神器,金屬髮卡。 拆鍵盤注意下面四個卡扣,所以拆的時候不要從下面撬開。我是從

原创 Linux 常用命令 權限管理命令

chmod 命令(改變文件或目錄權限) 命令介紹 命令名稱: chmod 命令英文原意:change the permissions mode of a file 命令所在路徑:/bin/chmod 執行權限: 所有用戶 語法:

原创 Oracle 版本問題 導致高效插入鎖死

先來看案例:  declare i int:=1; begin while i<=100 loop insert /*+ append */ into table1 (num) values (i); i:=i+1; e

原创 html 網頁變黑白

html{ filter:grayscale(100%);   -webkit-filter:grayscale(100%);   -moz-filter:grayscale(100%);   -ms-filter:graysca

原创 try-catch-finally return 的案例分析

返回值爲3,說明catch代碼執行完畢,又去執行了finally。  public static int funTest(){ int a = 0; try { int b

原创 SQL CASE WHEN 判斷語句

postgreSQL案例:  SELECT CASE WHEN (store_size <= (100)::NUMERIC) THEN '小店'::TEX

原创 Couldn't save uncommitted changes. Tried to save uncommitted changes in stash before Update

 git報錯: 2020-03-09 14:29 Couldn't save uncommitted changes. Tried to save uncommitted changes in stash before Updat