# services

## Purpose

The `services` plug-in sets up Grails' support for Services.

## Examples

An example service class in the `grails-app/services` directory:

    class BookService {
    	Book[] getBooks() {
    		Book.list() as Book[]
    	}
    }

## Description

Refer to the section on Services in the Grails user guide which details how Grails' service support works.

Configured Spring Beans given a service class of `BookService`:

- `BookServiceServiceClass` - The org.codehaus.groovy.grails.commons.GrailsServiceClass instance which understands the conventions defined within a services class.
- `BookService` - A bean configured according to the services'

scope: if the service is transactional then the type of the actual bean definition will be org.springframework.transaction.interceptor.TransactionProxyFactoryBean.