Browse Source

Document placeholder and Ant-style pattern support for `@Enable…Repositories`.

See spring-projects/spring-data-commons#3366
4.5.x
Mark Paluch 3 months ago
parent
commit
f073ff9731
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 16
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/config/EnableMongoRepositories.java
  2. 16
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/config/EnableReactiveMongoRepositories.java

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

@ -54,8 +54,20 @@ public @interface EnableMongoRepositories {
String[] value() default {}; String[] value() default {};
/** /**
* Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this * Base packages to scan for annotated components.
* attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names. * <p>
* {@link #value} is an alias for (and mutually exclusive with) this attribute.
* <p>
* Supports {@code ${}} placeholders which are resolved against the {@link org.springframework.core.env.Environment
* Environment} as well as Ant-style package patterns &mdash; for example, {@code "org.example.**"}.
* <p>
* Multiple packages or patterns may be specified, either separately or within a single {@code String} &mdash; for
* example, {@code {"org.example.config", "org.example.service.**"}} or
* {@code "org.example.config, org.example.service.**"}.
* <p>
* Use {@link #basePackageClasses} for a type-safe alternative to String-based package names.
*
* @see org.springframework.context.ConfigurableApplicationContext#CONFIG_LOCATION_DELIMITERS
*/ */
String[] basePackages() default {}; String[] basePackages() default {};

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

@ -57,8 +57,20 @@ public @interface EnableReactiveMongoRepositories {
String[] value() default {}; String[] value() default {};
/** /**
* Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this * Base packages to scan for annotated components.
* attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names. * <p>
* {@link #value} is an alias for (and mutually exclusive with) this attribute.
* <p>
* Supports {@code ${}} placeholders which are resolved against the {@link org.springframework.core.env.Environment
* Environment} as well as Ant-style package patterns &mdash; for example, {@code "org.example.**"}.
* <p>
* Multiple packages or patterns may be specified, either separately or within a single {@code String} &mdash; for
* example, {@code {"org.example.config", "org.example.service.**"}} or
* {@code "org.example.config, org.example.service.**"}.
* <p>
* Use {@link #basePackageClasses} for a type-safe alternative to String-based package names.
*
* @see org.springframework.context.ConfigurableApplicationContext#CONFIG_LOCATION_DELIMITERS
*/ */
String[] basePackages() default {}; String[] basePackages() default {};

Loading…
Cancel
Save