Skip to content

Commit c4e0112

Browse files
committed
Document placeholder and Ant-style pattern support for @Enable…Repositories.
See spring-projects/spring-data-commons#3366
1 parent 18fda67 commit c4e0112

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/EnableJdbcRepositories.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,20 @@
7070
String[] value() default {};
7171

7272
/**
73-
* Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this
74-
* attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names.
73+
* Base packages to scan for annotated components.
74+
* <p>
75+
* {@link #value} is an alias for (and mutually exclusive with) this attribute.
76+
* <p>
77+
* Supports {@code ${…}} placeholders which are resolved against the {@link org.springframework.core.env.Environment
78+
* Environment} as well as Ant-style package patterns &mdash; for example, {@code "org.example.**"}.
79+
* <p>
80+
* Multiple packages or patterns may be specified, either separately or within a single {@code String} &mdash; for
81+
* example, {@code {"org.example.config", "org.example.service.**"}} or
82+
* {@code "org.example.config, org.example.service.**"}.
83+
* <p>
84+
* Use {@link #basePackageClasses} for a type-safe alternative to String-based package names.
85+
*
86+
* @see org.springframework.context.ConfigurableApplicationContext#CONFIG_LOCATION_DELIMITERS
7587
*/
7688
String[] basePackages() default {};
7789

spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/config/EnableR2dbcRepositories.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,20 @@
5454
String[] value() default {};
5555

5656
/**
57-
* Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this
58-
* attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names.
57+
* Base packages to scan for annotated components.
58+
* <p>
59+
* {@link #value} is an alias for (and mutually exclusive with) this attribute.
60+
* <p>
61+
* Supports {@code ${…}} placeholders which are resolved against the {@link org.springframework.core.env.Environment
62+
* Environment} as well as Ant-style package patterns &mdash; for example, {@code "org.example.**"}.
63+
* <p>
64+
* Multiple packages or patterns may be specified, either separately or within a single {@code String} &mdash; for
65+
* example, {@code {"org.example.config", "org.example.service.**"}} or
66+
* {@code "org.example.config, org.example.service.**"}.
67+
* <p>
68+
* Use {@link #basePackageClasses} for a type-safe alternative to String-based package names.
69+
*
70+
* @see org.springframework.context.ConfigurableApplicationContext#CONFIG_LOCATION_DELIMITERS
5971
*/
6072
String[] basePackages() default {};
6173

0 commit comments

Comments
 (0)