
spring
gnail_oug
这个作者很懒,什么都没留下…
展开
-
spring事务不回滚throw的Exception异常的解决方法
spring事务中,throw的Exception异常事务不会回滚,原因是: 用 spring 事务管理器,由spring来负责数据库的打开,提交,回滚.默认遇到运行期例外(throw new RuntimeException("注释");)会回滚,即遇到不受检查(unchecked)的例外时回滚;而遇到需要捕获的例外(throw new Exception("注释");)不会回滚,即遇到受检查原创 2015-07-17 19:45:36 · 13936 阅读 · 0 评论 -
Spring ClassPathXmlApplicationContext和FileSystemXmlApplicationContext
原创 2013-07-24 15:49:43 · 116 阅读 · 0 评论