3.3. 定义repository接口

As a first step you define a domain class-specific repository interface. The interface must extend Repository and be typed to the domain class and an ID type. If you want to expose CRUD methods for that domain type, extend CrudRepository instead of Repository.

上面步骤第一步定义了一个指定了实体类的接口。这个接口必须声明被管理类与主键类型。 如果你还想扩展CRUD方法,继承CrudRepository接口而不是Repository接口。

results matching ""

    No results matching ""