原创 PostgreSQL錯誤代碼

PostgreSQL 服務器發出的所有消息都賦予了五個字符的錯誤代碼,這些代碼遵循SQL的 "SQLSTATE" 代碼的習慣。需要知道發生 了什麼錯誤條件的應用通常應該測試錯誤代碼,而不是查看文本錯誤信息。這些錯誤代碼輕易不會隨着Post

原创 JPA Criteria Query Examples

Get All Accounts @Override public Collection<DWAccount> getListAccount() { CriteriaBuilder criteriaBuil

原创 Linux 部署命令

測試機器是否通外網 curl -l http://www.baidu.com 查看端口是否開放 firewall-cmd --query-port=80/tcp 放開端口 firewall-cmd --zone=p

原创 PostgreSQL導出表結構|表數據

Windows PgAdmin 環境變量配置 PG_HOME:D:\Program Files\PostgreSQL\9.5     Path:%PG_HOME%\bin;%PG_HOME%\lib;%PG_HOME%\data;  

原创 Spring Boot AOP Log

package com.avp.mems.business.config; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterR

原创 Spring Data JPA - Reference Documentation

Spring Data JPA - Reference Documentation Spring Data JPA - Reference Documentation Oliver Gierke Thomas

原创 Windows下打包文件爲tar.gz格式

tar.gz 是linux和unix服務器使用的格式,在windows下的WinRAR、WinZip等主流壓縮工具不能壓縮成tar.gz格式。萬能的"7-ZIP"可以在windows下壓縮成linux需要的格式。 下載安裝

原创 PostgreSQL報表統計歷史12月度數據,無數據補零

SQL:統計歷史12個月數據,無數據補0 select a.repair_date, COALESCE(b.count, 0) as count from( SELECT TO_CHAR(NOW(), 'YY

原创 Common application properties

Various properties can be specified inside your application.properties/application.yml file or as command line swit

原创 linux Redhat Nginx 離線安裝

目標機器沒有網絡,只能下載各種Nginx依賴庫,手動離線安裝了。 下載所需要的依賴環境和庫 鏈接: https://pan.baidu.com/s/1u6TCHMTSNJYCWXTfmjRSxA 提取碼: nikc 解

原创 IntelliJ Idea 常用快捷鍵

Ctrl+Shift + Enter,語句完成 “!”,否定完成,輸入表達式時按 “!”鍵 Ctrl+E,最近的文件 Ctrl+Shift+E,最近更改的文件 Shift+Click,可以關閉文件 Ctrl+[ OR ],可以跑到

原创 複製(備份、恢復)postgresql數據庫

dump數據庫(結構&數據) 執行環境:Windows10,執行目錄:安裝bin目錄下。 .\pg_dump -h localhost -U postgres -p 5432 -d testDb -f .\dump.sql

原创 Validator 工具類

package com.avp.mems.backstage.util; /** * Created by Amber on 2017/5/27. * 工具類 */ public class Validator { pu

原创 activiti項目使用總結

activiti初始化配置 /** * Copyright (c) 2017 Avant-Port All Rights Reserved. */ package com.avp.mem.njpb.config; import

原创 linux cron 定時重啓服務

首先判斷cron是否已經安裝 sudo service crond status 添加定時任務 sudo crontab -e //添加root執行的定時任務 crontab -e //添加當前賬號執行的定時任務 su