Skip to content

Commit 8966dab

Browse files
committed
DOCS: Mention wildcard support in @EnableJpaRepositories#basePackages
1 parent e4fe9e2 commit 8966dab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/EnableJpaRepositories.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,18 @@
5353
/**
5454
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.:
5555
* {@code @EnableJpaRepositories("org.my.pkg")} instead of {@code @EnableJpaRepositories(basePackages="org.my.pkg")}.
56+
* <p>
57+
* Supports Ant-style wildcards for flexible package matching. See {@link #basePackages()} for more details and examples.
5658
*/
5759
String[] value() default {};
5860

5961
/**
6062
* Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this
6163
* attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names.
64+
* <p>
65+
* This attribute supports Ant-style wildcards for flexible package matching. For example,
66+
* {@code "com.example.**.repository"} will scan the {@code repository} package in all sub-packages of
67+
* {@code com.example}.
6268
*/
6369
String[] basePackages() default {};
6470

0 commit comments

Comments
 (0)