技術知識儲備
2017-11-16 知識點一(本人觀賞)
1.JSON和List互轉
String strJson = JSON.toJSONString(aList);
List<A> aList = (List<A>)JSON.parseArray(strJson,A.Class);
2.Mybatis中模糊查詢
....LIKE CONCAT ('%' , #{param,jdbcType = VARCHAR} , '%')
3.Mybatis 時間比較
....and create_date>=#{startDate} and create_date<=#{endDate}
4.Mybatis 查詢待付款,備貨中,已發貨的數量
select a.waitPayNum,b.perpareNum,c.sendNum from ( select count(*) as 'waitPayNum' from opf_order where delete_flag = 0) as a, ( .....) as b , (.....) as c
5.Mybatis 中批量修改
update opf_group set delete_flag = 1 where id in <foreach colllection="groupIdList" item = "item" open = "(" separator = ","close=")"> #{item}>
6.時間格式有時間誤差問題
@JSONFormat (pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
7.Spring 框架的2大核心
Spring 容器作為超級大工廠,負責建立,管理所有的java物件,這些物件稱為Bean;依賴注入管理Bean之間的關係。
AOP 面向切面
支援允許將一些通用任務 如安全,事務,日誌等集中管理,從而提高複用。
Spring 中用配置檔案來管理java例項的協作關係的人稱為控制反轉或依賴注入。
8.
ps -ef|grep java 檢視啟動情況
tail -f catalina.out 實時看到Tomcat的控制檯輸出
tail -f error.log 實時看到log檔案的輸出