Skip to content

Commit ef71709

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

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/config/EnableMongoRepositories.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

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/config/EnableReactiveMongoRepositories.java

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

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

0 commit comments

Comments
 (0)