原创 top命令詳解

1.top load average:數據是每隔5秒鐘檢查一次活躍的進程數,然後按特定算法計算出的數值。如果這個數除以邏輯CPU的數量,結果高於5的時候就表明系統在超負荷運轉了。 S:這個是進程的狀態。它有以下不同的值: D - 不可中

原创 時間查詢參數處理

在日常開發中經常遇到有時間範圍查詢的列表,那麼如何處理同一天,或者沒有精確到時分秒的時間參數,下面做個記錄: private void setSubmitTime(T param){ // 處理開始和結束日期相同的情況,結

原创 Linux上查看進程端口相關操作

查看服務指定端口是否被監聽 netstat -nap|grep 8084 查看指定進程的隨機端口: netstat -plunt|grep java

原创 jmap導出內存溢出文件

  使用jmap命令導出內存溢出文件 jmap -dump:format=b,file=heap.hprof pid(進程號) format=b文件格式 file=文件名稱 25374 進程號 2.jstack 進程號 https://

原创 截取字符串造成的空格問題

最近在項目中遇到,通過截取字符串,獲取編號, 去數據庫查詢,結果因爲截取的編號有空格,導致數據查詢不到。 String applyno = "L181106000182, L181107000252"; String[] applyno

原创 java.lang.IllegalStateException: Found multiple @SpringBootConfiguration annotated classes

最近在搭建springboot繼承dubbo的分佈式項目時,測試dao層遇到的問題,啓動測試方法時,出現如下錯誤: java.lang.IllegalStateException: Found multiple @SpringBootC

原创 倒序輸出字符串

public static void main(String[] args) { String str = "abc"; getChar(str); } public static void

原创 drools之體驗一

drools,規則引擎,把業務和規則進行分離。pom.xml<dependencies> <dependency> <groupId>org.drools</groupId>

原创 計算兩個日期之間的天數

/** * 計算兩個時間之間的天數 * @param dbtime1 晚的時間 * @param dbtime2 早的時間 * @return * @throws Exceptio

原创 一鍵選取所有複選框

<input type="checkbox" onclick="checkAll_box();"/>//一鍵選擇所有複選框 <input type="checkbox" name="announcementIDs" value="${ac

原创 hibernate 多表關聯查詢的數據封裝一

方式一:hql對象查詢,遇到從多個表中取數據進行顯示時可以嘗試;新建一個包裝類,封裝要查詢的數據以便進行顯示。OrderQuery是包裝類 sql如下: StringBuffer hql = new StringBuff

原创 struts2—配置struts2自定義攔截器實現登錄攔截1

自定義攔截器import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensym

原创 struts2—web.xml中配置struts2過濾器

<!-- struts2 入口過濾器 --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatche

原创 Mybatis獲取接口中string類型參數問題(一)

Preparing: select max(cast(substring(certificat0_.certificateNo, 11, 6) as signed)) as col_0_0_ from u_usercert_tab cer

原创 hibernate 多表關聯查詢數據封裝二

StringBuffer hql = new StringBuffer( "select new com.ulearning.ulms.order.model.OrderQuery" +