@@ -1115,26 +1115,27 @@ See
1115
1115
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration.java[`JpaBaseConfiguration`]
1116
1116
for the default settings.
1117
1117
1118
+
1119
+
1118
1120
[[howto-use-spring-data-jpa--and-mongo-repositories]]
1119
- === Use Spring Data JPA and Mongo repositories
1120
-
1121
- Spring Data JPA and Spring Data Mongo can both create `Repository`
1122
- implementations for you automatically. If they are both present on the
1123
- classpath, you might have to do some extra configuration to tell
1124
- Spring Boot which one (or both) you want to create repositories for
1125
- you. The most explicit way to do that is to use the standard Spring
1126
- Data `@Enable*Repositories` and tell it the location of your
1127
- `Repository` interfaces (where "*" is "Jpa" or "Mongo" or both).
1128
-
1129
- There are also flags `spring.data.*.repositories.enabled` that you can
1130
- use to switch the autoconfigured repositories on and off in external
1131
- configuration. This is useful for instance in case you want to switch
1132
- off the Mongo repositories and still use the autoconfigured
1133
- `MongoTemplate`.
1134
-
1135
- The same obstacle and the same features exist for other autoconfigured
1136
- Spring Data repository types (Elasticsearch, Solr). Just change the
1137
- names of the annotations and flags respectively.
1121
+ === Use Spring Data JPA and Mongo repositories
1122
+
1123
+ Spring Data JPA and Spring Data Mongo can both create `Repository` implementations for you
1124
+ automatically. If they are both present on the classpath, you might have to do some extra
1125
+ configuration to tell Spring Boot which one (or both) you want to create repositories for
1126
+ you. The most explicit way to do that is to use the standard Spring Data
1127
+ `@Enable*Repositories` and tell it the location of your `Repository` interfaces
1128
+ (where ``*'' is ``Jpa'' or ``Mongo'' or both).
1129
+
1130
+ There are also flags `spring.data.*.repositories.enabled` that you can use to switch the
1131
+ auto-configured repositories on and off in external configuration. This is useful for
1132
+ instance in case you want to switch off the Mongo repositories and still use the
1133
+ auto-configured `MongoTemplate`.
1134
+
1135
+ The same obstacle and the same features exist for other auto-configured Spring Data
1136
+ repository types (Elasticsearch, Solr). Just change the names of the annotations and flags
1137
+ respectively.
1138
+
1138
1139
1139
1140
1140
1141
[[howto-database-initialization]]
0 commit comments