摘要: @Transactional介绍 @Transactional是spring中声明式事务管理的注解配置方式,相信这个注解的作用大家都很清楚。@Transactional注解可以帮助我们把事务开启、提交或者回滚的操作,通过aop的方式进行管理。 通过@Transactional注解就能让spring为 阅读全文
posted @ 2022-04-13 21:43 倔强的老铁 阅读(1132) 评论(0) 推荐(0) 编辑
摘要: 1、分支逻辑提前return if (CollectionUtils.isEmpty(newDataList)) { // 提前判断,返回业务逻辑 return; } TestCodeData newData = newDataList.stream().filter(p -> { if (p.ge 阅读全文
posted @ 2022-04-13 11:25 倔强的老铁 阅读(458) 评论(0) 推荐(0) 编辑
摘要: import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.BeansException; import org.sprin 阅读全文
posted @ 2022-04-13 11:13 倔强的老铁 阅读(393) 评论(0) 推荐(0) 编辑