利用spring-core Util包中的Assert优雅的判断字符串、对象或者集合不为空
一般我们在Service中,判断字符串或对象不为空,会用相关的工具类来判断,比如Hutool的包,然后再抛个异常public List<Td42CaseFlow> getListByCaseKey(String caseKey) { if (StrUtil.isEmpty(caseKey)) { throw new BusinessException("案例编...
原创
2018-12-11 23:35:07 ·
5102 阅读 ·
0 评论