小编Jos*_*ron的帖子

Grails,抛出异常后保存域类

使用grails 3.3.8

如果在发出保存的服务方法中抛出了捕获的异常,则不会保存任何domainclass.save(flush:true,failOnError:true).即

try {
    //some code that throws exception
} catch (Exception exception) {
    print 'some message'
}

domainclass.save(flush:true,failOnError:true)
Run Code Online (Sandbox Code Playgroud)

grails grails-orm

7
推荐指数
1
解决办法
268
查看次数

标签 统计

grails ×1

grails-orm ×1