Adding business logic to a spring-data-rest application : <p>I have been experimenting with spring-data-rest (SDR) and am really impressed with how quickly I can build a rest api. My application is based around the following repository which gives me GET /attachements and POST /attachements  </p>

<pre><code>package com.deepskyblue.attachment.repository;

import java.util.List;

import org.springframework.data.repository.Repository;

import com.deepskyblue.attachment.domain.Attachment;

public interface AttachmentRepository extends Repository&lt;Attachment, Long&gt; {

    List&lt;Attachment&gt; findAll();

    Attachment save(Attachment attachment);
}
</code></pre>

<p>One thing I am confused about though is how I add custom business logic. SDR seems great if I just want a rest API to my data, however a traditional Spring application would normally have a service tier where I can have business logic. Is there a way of adding this business logic with SDR?</p>
