Map Repositories

Map 存储库驻留在 KeyValueTemplate 之上。使用默认的 SpelQueryCreator 允许根据给定的方法名称导出查询和排序表达式,如下面的示例所示:

Map repositories reside on top of the KeyValueTemplate. Using the default SpelQueryCreator allows deriving query and sort expressions from the given method name, as the following example shows:

@Configuration
@EnableMapRepositories
class KeyValueConfig {

}

interface PersonRepository implements CrudRepository<Person, String> {
    List<Person> findByLastname(String lastname);
}