摘要: 获取商品参数 json 串,转成 java 对象,再拼接成前台 html 的Service方法 在数据库中存储的 json 串: 通过 最外层是个 list ,然后里面是 map1,map1 里面的 key 为 params 的值 还是一个 List2,然后里面又是 Map2 下面附上 json工具 阅读全文
posted @ 2018-10-18 17:23 戈博折刀 阅读(1628) 评论(0) 推荐(0) 编辑
摘要: 我们在使用Spring时候一般都知道事务在遇到异常的时候会回滚,岂不知Spring的事务默认只有在发生运行时异常即:RunTimeException时才会发生事务,如果一个方法抛出Exception或者Checked异常Spring的事务并不会回滚。下面我们来看看异常的分类,异常一般分为Checke 阅读全文
posted @ 2018-10-18 16:28 戈博折刀 阅读(1799) 评论(0) 推荐(0) 编辑
摘要: 在service代码中 throw new Excepion("自定义异常“) 发现没有回滚, 然后百度了下, 改为抛出运行时异常 throw new RuntimeException("自定义运行时异常") 发现真的回滚了, 原来 spring 事务 只有碰到运行时异常 才回滚 阅读全文
posted @ 2018-10-18 16:25 戈博折刀 阅读(268) 评论(0) 推荐(0) 编辑
摘要: Spring声明式事务为何不回滚 rabbitGYK rabbitGYK 2016.12.29 22:35* 字数 1670 阅读 7310评论 35喜欢 151 2016.12.29 22:35* 字数 1670 阅读 7310评论 35喜欢 151 2016.12.29 22:35* 字数 16 阅读全文
posted @ 2018-10-18 16:21 戈博折刀 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Spring事务管理—aop:pointcut expression 常见切入点表达式及事物说明 例: <aop:config> <aop:pointcut expression="execution(* com.xy.service.*.*(..))" id="allDaoMethod" /> < 阅读全文
posted @ 2018-10-18 16:04 戈博折刀 阅读(485) 评论(0) 推荐(0) 编辑
摘要: mybatis中parameterType可以写的别名 https://blog.csdn.net/sdzhangshulong/article/details/51749807 _byte byte _long long _short short _int int _integer int _do 阅读全文
posted @ 2018-10-18 14:35 戈博折刀 阅读(2050) 评论(0) 推荐(0) 编辑