Polish disable repository documentation

This commit is contained in:
Phillip Webb 2014-06-09 11:28:25 -07:00
parent dcb17a7cb5
commit 21029d2323
2 changed files with 23 additions and 16 deletions

View File

@ -181,6 +181,7 @@ content into your application; rather pick only the properties that you need.
spring.data.mongodb.host= # the db host
spring.data.mongodb.port=27017 # the connection port (defaults to 27107)
spring.data.mongodb.uri=mongodb://localhost/test # connection URL
spring.data.mongo.repositories.enabled=true # if spring data repository support is enabled
# JPA ({sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[JpaBaseConfiguration], {sc-spring-boot-autoconfigure}/orm/jpa/HibernateJpaAutoConfiguration.{sc-ext}[HibernateJpaAutoConfiguration])
spring.jpa.properties.*= # properties to set on the JPA connection
@ -191,15 +192,20 @@ content into your application; rather pick only the properties that you need.
spring.jpa.generate-ddl=false # ignored by Hibernate, might be useful for other vendors
spring.jpa.hibernate.naming-strategy= # naming classname
spring.jpa.hibernate.ddl-auto= # defaults to create-drop for embedded dbs
spring.data.jpa.repositories.enabled=true # if spring data repository support is enabled
# SOLR ({sc-spring-boot-autoconfigure}/solr/SolrProperties.{sc-ext}[SolrProperties}])
spring.data.solr.host=http://127.0.0.1:8983/solr
spring.data.solr.zkHost=
spring.data.solr.repositories.enabled=true # if spring data repository support is enabled
# ELASTICSEARCH ({sc-spring-boot-autoconfigure}/elasticsearch/ElasticsearchProperties.{sc-ext}[ElasticsearchProperties}])
spring.data.elasticsearch.cluster-name= # The cluster name (defaults to elasticsearch)
spring.data.elasticsearch.cluster-node= # The address(es) of the server node (comma-separated; if not specified starts a client node)
spring.data.elasticsearch.local=true # if local mode should be used with client nodes
spring.data.elasticsearch.repositories.enabled=true # if spring data repository support is enabled
# FLYWAY ({sc-spring-boot-autoconfigure}/flyway/FlywayProperties.{sc-ext}[FlywayProperties])
flyway.locations=classpath:db/migrations # locations of migrations scripts

View File

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