> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/spring-data/jpa-repositories.md).

# Repositories

Spring offers a Repository interface for implementing the repository pattern.

In most cases these repositories will work without the need of a concrete implementation, Spring will generate the final repository from the interface.

```java
public interface EntityRepository extends JpaRepository<Entity, EntityKey> {

}
```

In this case the interface used is an extension specific for JPA.

## Base Repositories

```java
@NoRepositoryBean
public interface BaseRepository extends JpaRepository<Entity, EntityKey>
```

## More Information

* [Working with Spring Data Repositories](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories)
