在docker安裝並執行centos container並登入其bash介面的方式如下。
2020/5/31
2020/5/30
Spring Security 多角色權限範例
本篇使用Spring Security Basic Authentication驗證,使用者有多種角色(role)權限,搭配JSR-250 @RoleAllowed做REST API的存取限制。
2020/5/29
Spring Boot 自訂Java Bean驗證失敗回應訊息 custom bean validation fail response
Spring Boot使用bean validation驗證失敗時,預設會返回HTTP Status: 400 Bad Request及訊息。
Java 排序比較兩個可能有null的欄位 sorted by two fields with null
Java排序List時,若排序元素的屬性可能為null,則可以在Comparator的實作中處理null。
2020/5/28
Log4j2 API參數驗證錯誤輸出的日誌級別 log level for validating input args fail
在Controller接收外部傳入的參數時通常要驗證參數是否合法(例如金額不得小於0、結束日不能超過起始日、字串長度限制等),若驗證失敗時應該用什麼的log level輸出日誌?
訂閱:
文章 (Atom)