> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/30.-working-with-nosql-technologies/30.5-solr/30.5.2-spring-data-solr-repositories.md).

# 30.5.2 Spring Data Solr仓库

Spring Data包含的仓库也支持Apache Solr，正如先前讨论的JPA仓库，基于方法名自动创建查询是基本的原则。

实际上，不管是Spring Data JPA还是Spring Data Solr都共享相同的基础设施。你可以使用先前的JPA示例，并假设那个`City`现在是一个`@SolrDocument`类而不是JPA `@Entity`，它将以同样的方式工作。

**注** 具体参考[Spring Data Solr文档](https://projects.spring.io/spring-data-solr/)。
