摘要: 推荐,尤其是容量大时 Map<String,String> map = new HashMap<>(); for (Map.Entry<String,String> entry : map.entrySet()) { String key = entry.getKey(); String value 阅读全文
posted @ 2022-01-16 21:23 周文豪 阅读(699) 评论(0) 推荐(0)
摘要: 当前的日志级别是error LOGGER.info("保存出错!" + user); 应该改为: LOGGER.error("保存出错!" + user); 例1:日志级别为error public Result resetUserPwd(User user) { Result rs = new R 阅读全文
posted @ 2022-01-16 11:20 周文豪 阅读(65) 评论(0) 推荐(0)
摘要: 一、对资源的close()建议分开操作 如下: try{ XXX.close(); YYY.close(); } catch (Exception e){ ... } 建议改为 try{ XXX.close(); } catch (Exception e){ ... } try{ YYY.close 阅读全文
posted @ 2022-01-16 11:15 周文豪 阅读(117) 评论(0) 推荐(0)