Grails GORM 扩展通用接口

Grails GORM Extend Generic Interface

我无法创建通用数据服务接口并让数据服务实现它。例如:

interface DataServiceContract<T> {
    T get(Serializable id)
    T update(@NotNull Serializable id, @NotNull T obj)
    List<T> list()
    T save(@NotNull T t)
    void delete(Serializable id)
}

实施如下:

@Service(Book)
abstract class BookService implements DataServiceContract<Book>{
    abstract Book findByName(String name)
}

我最终得到:

Error:(6, 2) Groovyc: No implementations possible for method 'java.lang.Object get(java.io.Serializable)'. Please use an abstract class instead and provide an implementation.

这在框架内是不可能的吗?否则,我如何在数据服务之间共享操作?

Is this just not possible within framework?

没有支持该功能的框架版本。

我收到了同样的消息

Groovy:No implementations possible for method 'org.strotmann.fragdening.Experte get(java.io.Serializable)'. Please use an abstract class instead and provide an implementation.

在响应中生成所有内容后。服务。那将意味着 generate all 根本无法使用。