![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
木有会
人一能之,己百之。人十能之,己千之。果能此道矣,虽愚必明,虽柔必强。
展开
-
【spring】SpringAop报错: Null return value from advice does not match primitive return type for
是因为返回值是null,但是接收返回值的类型不允许是null导致的。 我是在多线程中又加了异步,返回值是boolean类型,但是boolean不允许是null导致的。 多线程中不要加异步。原创 2021-07-20 08:56:10 · 508 阅读 · 0 评论 -
【spring】org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because
注意事务的一致性,某个方法回滚,某个方法不回滚是不行的。 比如主方法trycatch一个异常会出此错误。 解决方案: 主方法和子方法都加上noRollbackFor某个异常。然后在主方法里解决该异常。 或 主方法trycatch该异常后再抛出去。 ...原创 2019-11-29 16:38:37 · 488 阅读 · 0 评论