JPA Repository之Repository

Repository.java源码:

package org.springframework.data.repository;

import org.springframework.stereotype.Indexed;

/**
 * Central repository marker interface. Captures the domain type to manage as well as the domain type's id type. General
 * purpose is to hold type information as well as being able to discover interfaces that extend this one during
 * classpath scanning for easy Spring bean creation.
 * 

* Domain repositories extending this interface can selectively expose CRUD methods by simply declaring methods of the * same signature as those declared in {@link CrudRepository}. * * @see CrudRepository * @param the domain type the repository manages * @param the type of the id of the entity the repository manages * @author Oliver Gierke */ @Indexed public interface Repository { }

Repository.java源码注释翻译:

package org.springframework.data.repository;

import org.springframework.stereotype.Indexed;

/**
 * 中央Repository标记接口。捕获要管理的领域类型以及领域类型的id类型。 
 * 一般用途是保存类型信息,并能够在类路径扫描期间发现扩展此接口的接口,以便轻松创建Spring bean。
 * 扩展此接口的域Repository可以通过简单地声明与{@link CrudRepository}中声明的方法具有相同签名的方法来选择性地公开CRUD方法。
 * 
 * @see CrudRepository
 * @param  Repository管理的领域类型。
 * @param  Repository管理的实体的id的类型
 * @author 奥利弗.基尔克
 */
@Indexed
public interface Repository {

}

你可能感兴趣的:(JPA Repository之Repository)