Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
21029d23
Commit
21029d23
authored
Jun 09, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish disable repository documentation
parent
dcb17a7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
19 deletions
+26
-19
appendix-application-properties.adoc
...cs/src/main/asciidoc/appendix-application-properties.adoc
+6
-0
howto.adoc
spring-boot-docs/src/main/asciidoc/howto.adoc
+20
-19
No files found.
spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc
View file @
21029d23
...
...
@@ -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
...
...
spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
21029d23
...
...
@@ -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
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`.
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.
=== 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).
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.
[[howto-database-initialization]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment