(Quick Reference)

transactional

目的
Purpose

Enables automatic transaction demarcation if not set or set to true

使用例
Examples

class BookService {
    static transactional = true
    …
}

詳細
Description

By default services have automatic transaction management such as propagation and so on. By setting transactional to false you disable automatic Spring managed transaction demarcation for every method in the service. When set to the true, The propagation level of the transaction is by default set to PROPAGATION_REQUIRED.

You can also configure services using Spring's @Transactional annotation. See Declarative Transactions in the user guide for more information.