I have the following REST repository, whose implementation is generated at runtime by Spring.
@RepositoryRestResource public interface FooRepository extends
I found a neat solution if you are using Java 8 - just use default methods in interface
@RepositoryRestResource public interface FooRepository extends CrudRepository { default S save(S var1) { //do some work here } }