(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.