Browse Source
Full editing pass of the Spring Data MongoDB reference guide. I also adjusted index.adoc to work with the changes I made to the build project, so that we get Epub and PDF as well as HTML. Original pull request: #559.pull/585/head
14 changed files with 682 additions and 654 deletions
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
@ -1,48 +1,47 @@
@@ -1,48 +1,47 @@
|
||||
= Spring Data MongoDB - Reference Documentation |
||||
Mark Pollack; Thomas Risberg; Oliver Gierke; Costin Leau; Jon Brisbin; Thomas Darimont; Christoph Strobl; Mark Paluch |
||||
Mark Pollack; Thomas Risberg; Oliver Gierke; Costin Leau; Jon Brisbin; Thomas Darimont; Christoph Strobl; Mark Paluch; Jay Bryant |
||||
:revnumber: {version} |
||||
:revdate: {localdate} |
||||
:toc: |
||||
:toc-placement!: |
||||
:linkcss: |
||||
:doctype: book |
||||
:docinfo: shared |
||||
:toc: left |
||||
:toclevels: 4 |
||||
:source-highlighter: prettify |
||||
:icons: font |
||||
:imagesdir: images |
||||
ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]] |
||||
:spring-data-commons-docs: ../../../../spring-data-commons/src/main/asciidoc |
||||
|
||||
(C) 2008-2018 The original authors. |
||||
|
||||
NOTE: _Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically._ |
||||
|
||||
toc::[] |
||||
NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. |
||||
|
||||
include::preface.adoc[] |
||||
|
||||
:leveloffset: +1 |
||||
include::new-features.adoc[] |
||||
include::{spring-data-commons-docs}/dependencies.adoc[] |
||||
include::{spring-data-commons-docs}/repositories.adoc[] |
||||
:leveloffset: -1 |
||||
include::new-features.adoc[leveloffset=+1] |
||||
include::{spring-data-commons-docs}/dependencies.adoc[leveloffset=+1] |
||||
include::{spring-data-commons-docs}/repositories.adoc[leveloffset=+1] |
||||
|
||||
[[reference]] |
||||
= Reference Documentation |
||||
|
||||
:leveloffset: +1 |
||||
include::reference/introduction.adoc[] |
||||
include::reference/mongodb.adoc[] |
||||
include::reference/mongo-repositories.adoc[] |
||||
include::{spring-data-commons-docs}/auditing.adoc[] |
||||
include::reference/mongo-auditing.adoc[] |
||||
include::reference/mapping.adoc[] |
||||
include::reference/cross-store.adoc[] |
||||
include::reference/logging.adoc[] |
||||
include::reference/jmx.adoc[] |
||||
include::reference/mongo-3.adoc[] |
||||
:leveloffset: -1 |
||||
include::reference/introduction.adoc[leveloffset=+1] |
||||
include::reference/mongodb.adoc[leveloffset=+1] |
||||
include::reference/mongo-repositories.adoc[leveloffset=+1] |
||||
include::{spring-data-commons-docs}/auditing.adoc[leveloffset=+1] |
||||
include::reference/mongo-auditing.adoc[leveloffset=+1] |
||||
include::reference/mapping.adoc[leveloffset=+1] |
||||
include::reference/cross-store.adoc[leveloffset=+1] |
||||
include::reference/logging.adoc[leveloffset=+1] |
||||
include::reference/jmx.adoc[leveloffset=+1] |
||||
include::reference/mongo-3.adoc[leveloffset=+1] |
||||
|
||||
[[appendix]] |
||||
= Appendix |
||||
|
||||
:numbered!: |
||||
:leveloffset: +1 |
||||
include::{spring-data-commons-docs}/repository-namespace-reference.adoc[] |
||||
include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[] |
||||
include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[] |
||||
include::{spring-data-commons-docs}/repository-query-return-types-reference.adoc[] |
||||
:leveloffset: -1 |
||||
include::{spring-data-commons-docs}/repository-namespace-reference.adoc[leveloffset=+1] |
||||
include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[leveloffset=+1] |
||||
include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[leveloffset=+1] |
||||
include::{spring-data-commons-docs}/repository-query-return-types-reference.adoc[leveloffset=+1] |
||||
|
||||
@ -1,59 +1,60 @@
@@ -1,59 +1,60 @@
|
||||
[[preface]] |
||||
= Preface |
||||
|
||||
The Spring Data MongoDB project applies core Spring concepts to the development of solutions using the MongoDB document style data store. We provide a "template" as a high-level abstraction for storing and querying documents. You will notice similarities to the JDBC support in the Spring Framework. |
||||
The Spring Data MongoDB project applies core Spring concepts to the development of solutions that use the MongoDB document style data store. We provide a "`template`" as a high-level abstraction for storing and querying documents. You may notice similarities to the JDBC support provided by the Spring Framework. |
||||
|
||||
This document is the reference guide for Spring Data - Document Support. It explains Document module concepts and semantics and the syntax for various store namespaces. |
||||
This document is the reference guide for Spring Data - Document Support. It explains Document module concepts and semantics and syntax for various store namespaces. |
||||
|
||||
This section provides some basic introduction to Spring and Document databases. The rest of the document refers only to Spring Data MongoDB features and assumes the user is familiar with MongoDB and Spring concepts. |
||||
|
||||
[[get-started:first-steps:spring]] |
||||
== Knowing Spring |
||||
Spring Data uses Spring framework's http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/spring-core.html[core] functionality, such as the http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/beans.html[IoC] container, http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/validation.html#core-convert[type conversion system], http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/expressions.html[expression language], http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/jmx.html[JMX integration], and portable http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/dao.html#dao-exceptions[DAO exception hierarchy]. While it is not important to know the Spring APIs, understanding the concepts behind them is. At a minimum, the idea behind IoC should be familiar for whatever IoC container you choose to use. |
||||
== Learning Spring |
||||
|
||||
The core functionality of the MongoDB support can be used directly, with no need to invoke the IoC services of the Spring Container. This is much like `JdbcTemplate` which can be used 'standalone' without any other services of the Spring container. To leverage all the features of Spring Data MongoDB, such as the repository support, you will need to configure some parts of the library using Spring. |
||||
Spring Data uses Spring framework's http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html[core] functionality, including: |
||||
|
||||
To learn more about Spring, you can refer to the comprehensive (and sometimes disarming) documentation that explains in detail the Spring Framework. There are a lot of articles, blog entries and books on the matter - take a look at the Spring framework http://spring.io/docs[home page] for more information. |
||||
* http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#beans[IoC] container |
||||
* http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#validation[type conversion system] |
||||
* http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#expressions[expression language] |
||||
* http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/integration.html#jmx[JMX integration] |
||||
* http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html#dao-exceptions[DAO exception hierarchy]. |
||||
|
||||
While you need not know the Spring APIs, understanding the concepts behind them is important. At a minimum, the idea behind Inversion of Control (IoC) should be familiar, and you should be familiar with whatever IoC container you choose to use. |
||||
|
||||
The core functionality of the MongoDB support can be used directly, with no need to invoke the IoC services of the Spring Container. This is much like `JdbcTemplate`, which can be used "'standalone'" without any other services of the Spring container. To leverage all the features of Spring Data MongoDB, such as the repository support, you need to configure some parts of the library to use Spring. |
||||
|
||||
To learn more about Spring, you can refer to the comprehensive documentation that explains the Spring Framework in detail. There are a lot of articles, blog entries, and books on the subject. See the Spring framework http://spring.io/docs[home page] for more information. |
||||
|
||||
[[get-started:first-steps:nosql]] |
||||
== Knowing NoSQL and Document databases |
||||
NoSQL stores have taken the storage world by storm. It is a vast domain with a plethora of solutions, terms and patterns (to make things worse even the term itself has multiple http://www.google.com/search?q=nosoql+acronym[meanings]). While some of the principles are common, it is crucial that the user is familiar to some degree with MongoDB. The best way to get acquainted to this solutions is to read their documentation and follow their examples - it usually doesn't take more then 5-10 minutes to go through them and if you are coming from an RDMBS-only background many times these exercises can be an eye opener. |
||||
== Learning NoSQL and Document databases |
||||
NoSQL stores have taken the storage world by storm. It is a vast domain with a plethora of solutions, terms, and patterns (to make things worse, even the term itself has multiple http://www.google.com/search?q=nosoql+acronym[meanings]). While some of the principles are common, you must be familiar with MongoDB to some degree. The best way to get acquainted is to read the documentation and follow the examples. It usually does not take more then 5-10 minutes to go through them and, especially if you are coming from an RDMBS-only background, these exercises can be an eye opener. |
||||
|
||||
The jumping off ground for learning about MongoDB is http://www.mongodb.org/[www.mongodb.org]. Here is a list of other useful resources: |
||||
The starting point for learning about MongoDB is http://www.mongodb.org/[www.mongodb.org]. Here is a list of other useful resources: |
||||
|
||||
* The http://docs.mongodb.org/manual/[manual] introduces MongoDB and contains links to getting started guides, reference documentation and tutorials. |
||||
* The http://docs.mongodb.org/manual/[manual] introduces MongoDB and contains links to getting started guides, reference documentation, and tutorials. |
||||
* The http://try.mongodb.org/[online shell] provides a convenient way to interact with a MongoDB instance in combination with the online http://docs.mongodb.org/manual/tutorial/getting-started/[tutorial.] |
||||
* MongoDB http://docs.mongodb.org/ecosystem/drivers/java/[Java Language Center] |
||||
* Several http://www.mongodb.org/books[books] available for purchase |
||||
* Karl Seguin's online book: http://openmymind.net/mongodb.pdf[The Little MongoDB Book] |
||||
* MongoDB http://docs.mongodb.org/ecosystem/drivers/java/[Java Language Center]. |
||||
* Several http://www.mongodb.org/books[books] you can purchase. |
||||
* Karl Seguin's online book: http://openmymind.net/mongodb.pdf[The Little MongoDB Book]. |
||||
|
||||
[[requirements]] |
||||
== Requirements |
||||
|
||||
Spring Data MongoDB 1.x binaries requires JDK level 6.0 and above, and http://spring.io/docs[Spring Framework] {springVersion} and above. |
||||
The Spring Data MongoDB 1.x binaries require JDK level 6.0 and above and http://spring.io/docs[Spring Framework] {springVersion} and above. |
||||
|
||||
In terms of document stores, http://www.mongodb.org/[MongoDB] at least 2.6. |
||||
|
||||
== Additional Help Resources |
||||
|
||||
Learning a new framework is not always straight forward. In this section, we try to provide what we think is an easy to follow guide for starting with Spring Data MongoDB module. However, if you encounter issues or you are just looking for an advice, feel free to use one of the links below: |
||||
In terms of document stores, you need at least version 2.6 of http://www.mongodb.org/[MongoDB]. |
||||
|
||||
[[get-started:help]] |
||||
=== Support |
||||
== Additional Help Resources |
||||
|
||||
There are a few support options available: |
||||
Learning a new framework is not always straightforward. In this section, we try to provide what we think is an easy-to-follow guide for starting with the Spring Data MongoDB module. However, if you encounter issues or you need advice, feel free to use one of the following links: |
||||
|
||||
[[get-started:help:community]] |
||||
==== Community Forum |
||||
|
||||
Spring Data on Stackoverflow http://stackoverflow.com/questions/tagged/spring-data[Stackoverflow] is a tag for all Spring Data (not just Document) users to share information and help each other. Note that registration is needed *only* for posting. |
||||
Community Forum :: Spring Data on http://stackoverflow.com/questions/tagged/spring-data[Stack Overflow] is a tag for all Spring Data (not just Document) users to share information and help each other. Note that registration is needed only for posting. |
||||
|
||||
[[get-started:help:professional]] |
||||
==== Professional Support |
||||
|
||||
Professional, from-the-source support, with guaranteed response time, is available from http://pivotal.io/[Pivotal Sofware, Inc.], the company behind Spring Data and Spring. |
||||
Professional Support :: Professional, from-the-source support, with guaranteed response time, is available from http://pivotal.io/[Pivotal Sofware, Inc.], the company behind Spring Data and Spring. |
||||
|
||||
[[get-started:up-to-date]] |
||||
=== Following Development |
||||
== Following Development |
||||
|
||||
For information on the Spring Data Mongo source code repository, nightly builds and snapshot artifacts please see the http://projects.spring.io/spring-data-mongodb/[Spring Data Mongo homepage]. You can help make Spring Data best serve the needs of the Spring community by interacting with developers through the Community on http://stackoverflow.com/questions/tagged/spring-data[Stackoverflow]. To follow developer activity look for the mailing list information on the Spring Data Mongo homepage. If you encounter a bug or want to suggest an improvement, please create a ticket on the Spring Data issue https://jira.spring.io/browse/DATAMONGO[tracker]. To stay up to date with the latest news and announcements in the Spring eco system, subscribe to the Spring Community http://spring.io[Portal]. Lastly, you can follow the Spring http://spring.io/blog[blog ]or the project team on Twitter (http://twitter.com/SpringData[SpringData]). |
||||
For information on the Spring Data Mongo source code repository, nightly builds, and snapshot artifacts, see the Spring Data Mongo http://projects.spring.io/spring-data-mongodb/[homepage]. You can help make Spring Data best serve the needs of the Spring community by interacting with developers through the Community on http://stackoverflow.com/questions/tagged/spring-data[Stack Overflow]. To follow developer activity, look for the mailing list information on the Spring Data Mongo https://projects.spring.io/spring-data-mongodb/[homepage]. If you encounter a bug or want to suggest an improvement, please create a ticket on the Spring Data issue https://jira.spring.io/browse/DATAMONGO[tracker]. To stay up to date with the latest news and announcements in the Spring eco system, subscribe to the Spring Community http://spring.io[Portal]. You can also follow the Spring http://spring.io/blog[blog ]or the project team on Twitter (http://twitter.com/SpringData[SpringData]). |
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue