摘要: 在Grails中Service层默认就是支持事务的,事务传播级别默认是PROPAGATION_REQUIRED. 当然你也可以设置transactional = false.如果transactional 设置为true, 则在Service层如何方法内部抛出RuntimeException类型异常, 所有操作将会回滚.class UserService {boolean transactional = true public boolean register(User user, UserInfo userInfo) throws RuntimeException { if (user.sa 阅读全文
posted @ 2013-01-13 13:01 疾行の亚索 阅读(452) 评论(0) 推荐(0) 编辑