Skip to content

Commit 1a8e9c1

Browse files
committed
Fix "Use Spring Data repositories" how-to to refer to interfaces
The previous how-to accidentally referenced the `@Repository` annotation and not the Spring Data `Repository` interface. Closes gh-41625
1 parent 92c3dbe commit 1a8e9c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ Note that each `configuration` sub namespace provides advanced settings based on
149149

150150
[[howto.data-access.spring-data-repositories]]
151151
=== Use Spring Data Repositories
152-
Spring Data can create implementations of `@Repository` interfaces of various flavors.
153-
Spring Boot handles all of that for you, as long as those `@Repository` annotations are included in one of the <<using#using.auto-configuration.packages,auto-configuration packages>>, typically the package (or a sub-package) of your main application class that is annotated with `@SpringBootApplication` or `@EnableAutoConfiguration`.
152+
Spring Data can create implementations of `Repository` interfaces of various flavors.
153+
Spring Boot handles all of that for you, as long as those `Repository` implementations are included in one of the <<using#using.auto-configuration.packages,auto-configuration packages>>, typically the package (or a sub-package) of your main application class that is annotated with `@SpringBootApplication` or `@EnableAutoConfiguration`.
154154

155155
For many applications, all you need is to put the right Spring Data dependencies on your classpath.
156156
There is a `spring-boot-starter-data-jpa` for JPA, `spring-boot-starter-data-mongodb` for Mongodb, and various other starters for supported technologies.
157157
To get started, create some repository interfaces to handle your `@Entity` objects.
158158

159-
Spring Boot determines the location of your `@Repository` definitions by scanning the <<using#using.auto-configuration.packages,auto-configuration packages>>.
159+
Spring Boot determines the location of your `Repository` implementations by scanning the <<using#using.auto-configuration.packages,auto-configuration packages>>.
160160
For more control, use the `@Enable…Repositories` annotations from Spring Data.
161161

162162
For more about Spring Data, see the {spring-data}[Spring Data project page].

0 commit comments

Comments
 (0)