Browse Source

DATAMONGO-2231 - URL Cleanup.

This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* [ ] http://geojson.org/ (200) with 4 occurrences could not be migrated:
   ([https](https://geojson.org/) result SSLHandshakeException).
* [ ] http://geojson.org/geojson-spec.html (200) with 16 occurrences could not be migrated:
   ([https](https://geojson.org/geojson-spec.html) result SSLHandshakeException).
* [ ] http://site.icu-project.org (200) with 1 occurrences could not be migrated:
   ([https](https://site.icu-project.org) result ClosedChannelException).
* [ ] http://userguide.icu-project.org/collation/concepts (200) with 1 occurrences could not be migrated:
   ([https](https://userguide.icu-project.org/collation/concepts) result ClosedChannelException).
* [ ] http://www.querydsl.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://www.querydsl.com/) result AnnotatedConnectException).
* [ ] http://www.querydsl.com/static/querydsl/latest/reference/html/ (200) with 2 occurrences could not be migrated:
   ([https](https://www.querydsl.com/static/querydsl/latest/reference/html/) result AnnotatedConnectException).
* [ ] http://www.querydsl.com/team (200) with 8 occurrences could not be migrated:
   ([https](https://www.querydsl.com/team) result AnnotatedConnectException).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://docs.spring.io/spring/docs/ with 18 occurrences migrated to:
  https://docs.spring.io/spring/docs/ ([https](https://docs.spring.io/spring/docs/) result 200).
* [ ] http://maven.apache.org/xsd/maven-4.0.0.xsd with 2 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* [ ] http://media.mongodb.org/zips.json with 1 occurrences migrated to:
  https://media.mongodb.org/zips.json ([https](https://media.mongodb.org/zips.json) result 200).
* [ ] http://openjdk.java.net/projects/code-tools/jmh/ with 1 occurrences migrated to:
  https://openjdk.java.net/projects/code-tools/jmh/ ([https](https://openjdk.java.net/projects/code-tools/jmh/) result 200).
* [ ] http://openmymind.net/mongodb.pdf with 1 occurrences migrated to:
  https://openmymind.net/mongodb.pdf ([https](https://openmymind.net/mongodb.pdf) result 200).
* [ ] http://pivotal.io/ with 1 occurrences migrated to:
  https://pivotal.io/ ([https](https://pivotal.io/) result 200).
* [ ] http://projectreactor.io/docs/ with 1 occurrences migrated to:
  https://projectreactor.io/docs/ ([https](https://projectreactor.io/docs/) result 200).
* [ ] http://projectreactor.io/docs/core/release/reference/ with 1 occurrences migrated to:
  https://projectreactor.io/docs/core/release/reference/ ([https](https://projectreactor.io/docs/core/release/reference/) result 200).
* [ ] http://projects.spring.io/ with 1 occurrences migrated to:
  https://projects.spring.io/ ([https](https://projects.spring.io/) result 200).
* [ ] http://projects.spring.io/spring-data-mongodb/ with 2 occurrences migrated to:
  https://projects.spring.io/spring-data-mongodb/ ([https](https://projects.spring.io/spring-data-mongodb/) result 200).
* [ ] http://repo.spring.io/milestone/org/springframework/data/ with 1 occurrences migrated to:
  https://repo.spring.io/milestone/org/springframework/data/ ([https](https://repo.spring.io/milestone/org/springframework/data/) result 200).
* [ ] http://spring.io with 1 occurrences migrated to:
  https://spring.io ([https](https://spring.io) result 200).
* [ ] http://spring.io/blog with 2 occurrences migrated to:
  https://spring.io/blog ([https](https://spring.io/blog) result 200).
* [ ] http://spring.io/docs with 2 occurrences migrated to:
  https://spring.io/docs ([https](https://spring.io/docs) result 200).
* [ ] http://spring.io/tools/sts with 1 occurrences migrated to:
  https://spring.io/tools/sts ([https](https://spring.io/tools/sts) result 200).
* [ ] http://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati with 2 occurrences migrated to:
  https://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati ([https](https://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati) result 200).
* [ ] http://stackoverflow.com/questions/24185987/using-root-inside-spring-data-mongodb-for-retrieving-whole-document with 1 occurrences migrated to:
  https://stackoverflow.com/questions/24185987/using-root-inside-spring-data-mongodb-for-retrieving-whole-document ([https](https://stackoverflow.com/questions/24185987/using-root-inside-spring-data-mongodb-for-retrieving-whole-document) result 200).
* [ ] http://stackoverflow.com/questions/tagged/spring-data with 2 occurrences migrated to:
  https://stackoverflow.com/questions/tagged/spring-data ([https](https://stackoverflow.com/questions/tagged/spring-data) result 200).
* [ ] http://stackoverflow.com/questions/tagged/spring-data-mongodb with 2 occurrences migrated to:
  https://stackoverflow.com/questions/tagged/spring-data-mongodb ([https](https://stackoverflow.com/questions/tagged/spring-data-mongodb) result 200).
* [ ] http://twitter.com/SpringData with 1 occurrences migrated to:
  https://twitter.com/SpringData ([https](https://twitter.com/SpringData) result 200).
* [ ] http://www.google.com/search?q=nosoql+acronym with 1 occurrences migrated to:
  https://www.google.com/search?q=nosoql+acronym ([https](https://www.google.com/search?q=nosoql+acronym) result 200).
* [ ] http://www.reactive-streams.org/ with 1 occurrences migrated to:
  https://www.reactive-streams.org/ ([https](https://www.reactive-streams.org/) result 200).
* [ ] http://www.springframework.org/schema/beans/spring-beans.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* [ ] http://www.springframework.org/schema/context/spring-context.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* [ ] http://www.springframework.org/schema/data/repository/spring-repository.xsd with 10 occurrences migrated to:
  https://www.springframework.org/schema/data/repository/spring-repository.xsd ([https](https://www.springframework.org/schema/data/repository/spring-repository.xsd) result 200).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://docs.mongodb.org/ecosystem/drivers/java/ with 1 occurrences migrated to:
  https://docs.mongodb.org/ecosystem/drivers/java/ ([https](https://docs.mongodb.org/ecosystem/drivers/java/) result 301).
* [ ] http://docs.mongodb.org/manual/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/ ([https](https://docs.mongodb.org/manual/) result 301).
* [ ] http://docs.mongodb.org/manual/aggregation/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/aggregation/ ([https](https://docs.mongodb.org/manual/aggregation/) result 301).
* [ ] http://docs.mongodb.org/manual/core/2dsphere/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/core/2dsphere/ ([https](https://docs.mongodb.org/manual/core/2dsphere/) result 301).
* [ ] http://docs.mongodb.org/manual/core/introduction/ with 2 occurrences migrated to:
  https://docs.mongodb.org/manual/core/introduction/ ([https](https://docs.mongodb.org/manual/core/introduction/) result 301).
* [ ] http://docs.mongodb.org/manual/reference/operator/aggregation/bucket/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/reference/operator/aggregation/bucket/ ([https](https://docs.mongodb.org/manual/reference/operator/aggregation/bucket/) result 301).
* [ ] http://docs.mongodb.org/manual/reference/operator/aggregation/bucketAuto/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/reference/operator/aggregation/bucketAuto/ ([https](https://docs.mongodb.org/manual/reference/operator/aggregation/bucketAuto/) result 301).
* [ ] http://docs.mongodb.org/manual/reference/operator/aggregation/facet/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/reference/operator/aggregation/facet/ ([https](https://docs.mongodb.org/manual/reference/operator/aggregation/facet/) result 301).
* [ ] http://docs.mongodb.org/manual/reference/operator/aggregation/project/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/reference/operator/aggregation/project/ ([https](https://docs.mongodb.org/manual/reference/operator/aggregation/project/) result 301).
* [ ] http://docs.mongodb.org/manual/reference/operator/query/text/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/reference/operator/query/text/ ([https](https://docs.mongodb.org/manual/reference/operator/query/text/) result 301).
* [ ] http://docs.mongodb.org/manual/tutorial/aggregation-examples/ with 2 occurrences migrated to:
  https://docs.mongodb.org/manual/tutorial/aggregation-examples/ ([https](https://docs.mongodb.org/manual/tutorial/aggregation-examples/) result 301).
* [ ] http://docs.mongodb.org/manual/tutorial/getting-started/ with 1 occurrences migrated to:
  https://docs.mongodb.org/manual/tutorial/getting-started/ ([https](https://docs.mongodb.org/manual/tutorial/getting-started/) result 301).
* [ ] http://docs.spring.io/spring-data/mongodb/docs/current/api/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/mongodb/docs/current/api/ ([https](https://docs.spring.io/spring-data/mongodb/docs/current/api/) result 301).
* [ ] http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/ ([https](https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/) result 301).
* [ ] http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html ([https](https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html) result 301).
* [ ] http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html with 10 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html ([https](https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html) result 301).
* [ ] http://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html ([https](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html) result 301).
* [ ] http://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html ([https](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html) result 301).
* [ ] http://help.github.com/forking/ with 1 occurrences migrated to:
  https://help.github.com/forking/ ([https](https://help.github.com/forking/) result 301).
* [ ] http://projects.spring.io/spring-data with 1 occurrences migrated to:
  https://projects.spring.io/spring-data ([https](https://projects.spring.io/spring-data) result 301).
* [ ] http://projects.spring.io/spring-data-mongodb with 3 occurrences migrated to:
  https://projects.spring.io/spring-data-mongodb ([https](https://projects.spring.io/spring-data-mongodb) result 301).
* [ ] http://springsource.org with 4 occurrences migrated to:
  https://springsource.org ([https](https://springsource.org) result 301).
* [ ] http://www.mongodb.org/ with 2 occurrences migrated to:
  https://www.mongodb.org/ ([https](https://www.mongodb.org/) result 301).
* [ ] http://www.mongodb.org/books with 1 occurrences migrated to:
  https://www.mongodb.org/books ([https](https://www.mongodb.org/books) result 301).
* [ ] http://www.mongodb.org/display/DOCS/Aggregation with 1 occurrences migrated to:
  https://www.mongodb.org/display/DOCS/Aggregation ([https](https://www.mongodb.org/display/DOCS/Aggregation) result 301).
* [ ] http://www.springframework.org/schema/beans/spring-beans-3.0.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.0.xsd) result 301).
* [ ] http://www.springframework.org/schema/context/spring-context-3.0.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.0.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.0.xsd) result 301).
* [ ] http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd ([https](https://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd) result 301).
* [ ] http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd ([https](https://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd) result 301).
* [ ] http://www.springframework.org/schema/data/mongo/spring-mongo.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/data/mongo/spring-mongo.xsd ([https](https://www.springframework.org/schema/data/mongo/spring-mongo.xsd) result 301).
* [ ] http://www.springframework.org/schema/data/repository/spring-repository-1.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/data/repository/spring-repository-1.0.xsd ([https](https://www.springframework.org/schema/data/repository/spring-repository-1.0.xsd) result 301).
* [ ] http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd) result 301).
* [ ] http://repo.spring.io/libs-milestone with 1 occurrences migrated to:
  https://repo.spring.io/libs-milestone ([https](https://repo.spring.io/libs-milestone) result 302).
* [ ] http://repo.spring.io/libs-snapshot with 1 occurrences migrated to:
  https://repo.spring.io/libs-snapshot ([https](https://repo.spring.io/libs-snapshot) result 302).
* [ ] http://try.mongodb.org/ with 1 occurrences migrated to:
  https://try.mongodb.org/ ([https](https://try.mongodb.org/) result 302).
* [ ] http://www.springsource.org/download with 1 occurrences migrated to:
  https://www.springsource.org/download ([https](https://www.springsource.org/download) result 302).

# Ignored
These URLs were intentionally ignored.

* http://127.0.0.1:8080/capture-benchmarks with 1 occurrences
* http://maven.apache.org/POM/4.0.0 with 4 occurrences
* http://www.springframework.org/schema/beans with 38 occurrences
* http://www.springframework.org/schema/context with 27 occurrences
* http://www.springframework.org/schema/data/jpa with 2 occurrences
* http://www.springframework.org/schema/data/mongo with 38 occurrences
* http://www.springframework.org/schema/data/repository with 22 occurrences
* http://www.springframework.org/schema/jdbc with 2 occurrences
* http://www.springframework.org/schema/tool with 22 occurrences
* http://www.w3.org/2001/XMLSchema with 11 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 20 occurrences

Original Pull Request: #695
pull/727/head
Spring Operator 7 years ago committed by Christoph Strobl
parent
commit
407f998a13
  1. 2
      CODE_OF_CONDUCT.adoc
  2. 28
      README.md
  3. 2
      spring-data-mongodb-benchmarks/README.md
  4. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java
  5. 14
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java
  6. 2
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationSpELExpression.java
  7. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.0.xsd
  8. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.1.xsd
  9. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.2.xsd
  10. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.xsd
  11. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.2.xsd
  12. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.3.xsd
  13. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.4.xsd
  14. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.5.xsd
  15. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.7.xsd
  16. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd
  17. 2
      spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-2.0.xsd
  18. 6
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationTests.java
  19. 2
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ZipInfo.java
  20. 8
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/MappingMongoConverterUnitTests.java
  21. 2
      src/main/asciidoc/new-features.adoc
  22. 38
      src/main/asciidoc/preface.adoc
  23. 4
      src/main/asciidoc/reference/client-session-transactions.adoc
  24. 12
      src/main/asciidoc/reference/cross-store.adoc
  25. 8
      src/main/asciidoc/reference/jmx.adoc
  26. 10
      src/main/asciidoc/reference/mapping.adoc
  27. 8
      src/main/asciidoc/reference/mongo-3.adoc
  28. 4
      src/main/asciidoc/reference/mongo-repositories.adoc
  29. 50
      src/main/asciidoc/reference/mongodb.adoc
  30. 2
      src/main/asciidoc/reference/reactive-mongo-repositories.adoc
  31. 6
      src/main/asciidoc/reference/reactive-mongodb.adoc
  32. 2
      src/main/resources/license.txt

2
CODE_OF_CONDUCT.adoc

@ -24,4 +24,4 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be repor @@ -24,4 +24,4 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be repor
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
This Code of Conduct is adapted from the http://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at http://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/].
This Code of Conduct is adapted from the https://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at https://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/].

28
README.md

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
[![Spring Data MongoDB](https://spring.io/badges/spring-data-mongodb/ga.svg)](http://projects.spring.io/spring-data-mongodb#quick-start)
[![Spring Data MongoDB](https://spring.io/badges/spring-data-mongodb/snapshot.svg)](http://projects.spring.io/spring-data-mongodb#quick-start)
[![Spring Data MongoDB](https://spring.io/badges/spring-data-mongodb/ga.svg)](https://projects.spring.io/spring-data-mongodb#quick-start)
[![Spring Data MongoDB](https://spring.io/badges/spring-data-mongodb/snapshot.svg)](https://projects.spring.io/spring-data-mongodb#quick-start)
# Spring Data MongoDB
The primary goal of the [Spring Data](http://projects.spring.io/spring-data) project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
The primary goal of the [Spring Data](https://projects.spring.io/spring-data) project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
The Spring Data MongoDB project aims to provide a familiar and consistent Spring-based programming model for new datastores while retaining store-specific features and capabilities. The Spring Data MongoDB project provides integration with the MongoDB document database. Key functional areas of Spring Data MongoDB are a POJO centric model for interacting with a MongoDB DBCollection and easily writing a repository style data access layer.
@ -11,12 +11,12 @@ The Spring Data MongoDB project aims to provide a familiar and consistent Spring @@ -11,12 +11,12 @@ The Spring Data MongoDB project aims to provide a familiar and consistent Spring
For a comprehensive treatment of all the Spring Data MongoDB features, please refer to:
* the [User Guide](http://docs.spring.io/spring-data/mongodb/docs/current/reference/html/)
* the [JavaDocs](http://docs.spring.io/spring-data/mongodb/docs/current/api/) have extensive comments in them as well.
* the home page of [Spring Data MongoDB](http://projects.spring.io/spring-data-mongodb) contains links to articles and other resources.
* for more detailed questions, use [Spring Data Mongodb on Stackoverflow](http://stackoverflow.com/questions/tagged/spring-data-mongodb).
* the [User Guide](https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/)
* the [JavaDocs](https://docs.spring.io/spring-data/mongodb/docs/current/api/) have extensive comments in them as well.
* the home page of [Spring Data MongoDB](https://projects.spring.io/spring-data-mongodb) contains links to articles and other resources.
* for more detailed questions, use [Spring Data Mongodb on Stackoverflow](https://stackoverflow.com/questions/tagged/spring-data-mongodb).
If you are new to Spring as well as to Spring Data, look for information about [Spring projects](http://projects.spring.io/).
If you are new to Spring as well as to Spring Data, look for information about [Spring projects](https://projects.spring.io/).
## Quick Start
@ -45,7 +45,7 @@ If you'd rather like the latest snapshots of the upcoming major version, use our @@ -45,7 +45,7 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/libs-snapshot</url>
<url>https://repo.spring.io/libs-snapshot</url>
</repository>
```
@ -56,7 +56,7 @@ MongoTemplate is the central support class for Mongo database operations. It pro @@ -56,7 +56,7 @@ MongoTemplate is the central support class for Mongo database operations. It pro
* Basic POJO mapping support to and from BSON
* Convenience methods to interact with the store (insert object, update objects) and MongoDB specific ones (geo-spatial operations, upserts, map-reduce etc.)
* Connection affinity callback
* Exception translation into Spring's [technology agnostic DAO exception hierarchy](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html#dao-exceptions).
* Exception translation into Spring's [technology agnostic DAO exception hierarchy](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/dao.html#dao-exceptions).
### Spring Data repositories
@ -144,7 +144,7 @@ As of version 4 MongoDB supports [Transactions](https://www.mongodb.com/transact @@ -144,7 +144,7 @@ As of version 4 MongoDB supports [Transactions](https://www.mongodb.com/transact
`ClientSessions` and therefore require an active session.
`MongoTransactionManager` is the gateway to the well known Spring transaction support. It allows applications to use
[managed transaction features of Spring](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html).
[managed transaction features of Spring](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/transaction.html).
The `MongoTransactionManager` binds a `ClientSession` to the thread. `MongoTemplate` automatically detects those and operates on them accordingly.
```java
@ -178,9 +178,9 @@ public class StateService { @@ -178,9 +178,9 @@ public class StateService {
Here are some ways for you to get involved in the community:
* Get involved with the Spring community on Stackoverflow and help out on the [spring-data-mongodb](http://stackoverflow.com/questions/tagged/spring-data-mongodb) tag by responding to questions and joining the debate.
* Get involved with the Spring community on Stackoverflow and help out on the [spring-data-mongodb](https://stackoverflow.com/questions/tagged/spring-data-mongodb) tag by responding to questions and joining the debate.
* Create [JIRA](https://jira.spring.io/browse/DATAMONGO) tickets for bugs and new features and comment and vote on the ones that you are interested in.
* Github is for social coding: if you want to write code, we encourage contributions through pull requests from [forks of this repository](http://help.github.com/forking/). If you want to contribute code this way, please reference a JIRA ticket as well covering the specific issue you are addressing.
* Watch for upcoming articles on Spring by [subscribing](http://spring.io/blog) to spring.io.
* Github is for social coding: if you want to write code, we encourage contributions through pull requests from [forks of this repository](https://help.github.com/forking/). If you want to contribute code this way, please reference a JIRA ticket as well covering the specific issue you are addressing.
* Watch for upcoming articles on Spring by [subscribing](https://spring.io/blog) to spring.io.
Before we accept a non-trivial patch or pull request we will need you to [sign the Contributor License Agreement](https://cla.pivotal.io/sign/spring). Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. If you forget to do so, you'll be reminded when you submit a pull request. Active contributors might be asked to join the core team, and given the ability to merge pull requests.

2
spring-data-mongodb-benchmarks/README.md

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
# Benchmarks
Benchmarks are based on [JMH](http://openjdk.java.net/projects/code-tools/jmh/).
Benchmarks are based on [JMH](https://openjdk.java.net/projects/code-tools/jmh/).
# Running Benchmarks

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoOperations.java

@ -1134,7 +1134,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -1134,7 +1134,7 @@ public interface MongoOperations extends FluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* Conversion"</a> for more details.
* <p/>
* <p/>
@ -1196,7 +1196,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -1196,7 +1196,7 @@ public interface MongoOperations extends FluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* Conversion"</a> for more details.
*
* @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1214,7 +1214,7 @@ public interface MongoOperations extends FluentMongoOperations { @@ -1214,7 +1214,7 @@ public interface MongoOperations extends FluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See <a
* http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type
* https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type
* Conversion"</a> for more details.
*
* @param objectToSave the object to store in the collection. Must not be {@literal null}.

14
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoOperations.java

@ -62,7 +62,7 @@ import com.mongodb.reactivestreams.client.MongoCollection; @@ -62,7 +62,7 @@ import com.mongodb.reactivestreams.client.MongoCollection;
* @since 2.0
* @see Flux
* @see Mono
* @see <a href="http://projectreactor.io/docs/">Project Reactor</a>
* @see <a href="https://projectreactor.io/docs/">Project Reactor</a>
*/
public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
@ -920,7 +920,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -920,7 +920,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* Conversion"</a> for more details.
* <p/>
* <p/>
@ -980,7 +980,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -980,7 +980,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* Conversion"</a> for more details.
* <p/>
* <p/>
@ -1028,7 +1028,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -1028,7 +1028,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* Conversion"</a> for more details.
*
* @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1046,7 +1046,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -1046,7 +1046,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See <a
* http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type
* https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type
* Conversion"</a> for more details.
*
* @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1065,7 +1065,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -1065,7 +1065,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation" > Spring's Type
* Conversion"</a> for more details.
*
* @param objectToSave the object to store in the collection. Must not be {@literal null}.
@ -1083,7 +1083,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations { @@ -1083,7 +1083,7 @@ public interface ReactiveMongoOperations extends ReactiveFluentMongoOperations {
* If you object has an "Id' property, it will be set with the generated Id from MongoDB. If your Id property is a
* String then MongoDB ObjectId will be used to populate that string. Otherwise, the conversion from ObjectId to your
* property type will be handled by Spring's BeanWrapper class that leverages Type Conversion API. See <a
* http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type
* https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#validation">Spring's Type
* Conversion"</a> for more details.
*
* @param objectToSave the object to store in the collection. Must not be {@literal null}.

2
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationSpELExpression.java

@ -20,7 +20,7 @@ import org.springframework.util.Assert; @@ -20,7 +20,7 @@ import org.springframework.util.Assert;
/**
* An {@link AggregationExpression} that renders a MongoDB Aggregation Framework expression from the AST of a
* <a href="http://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions">SpEL
* <a href="https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#expressions">SpEL
* expression</a>. <br />
* <br />
* <strong>Samples:</strong> <br />

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.0.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository-1.0.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository-1.0.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.1.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.2.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.10.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.2.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.3.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.4.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.5.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.7.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-1.8.xsd

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo" type="mongoType">
<xsd:annotation>

2
spring-data-mongodb/src/main/resources/org/springframework/data/mongodb/config/spring-mongo-2.0.xsd

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
<xsd:import namespace="http://www.springframework.org/schema/tool" />
<xsd:import namespace="http://www.springframework.org/schema/context" />
<xsd:import namespace="http://www.springframework.org/schema/data/repository"
schemaLocation="http://www.springframework.org/schema/data/repository/spring-repository.xsd" />
schemaLocation="https://www.springframework.org/schema/data/repository/spring-repository.xsd" />
<xsd:element name="mongo-client" type="mongoClientType">
<xsd:annotation>

6
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/AggregationTests.java

@ -1014,7 +1014,7 @@ public class AggregationTests { @@ -1014,7 +1014,7 @@ public class AggregationTests {
/**
* @see <a href=
* "http://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati">Spring
* "https://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati">Spring
* Data MongoDB - Aggregation Framework - invalid reference in group Operation</a>
*/
@Test // DATAMONGO-753
@ -1043,7 +1043,7 @@ public class AggregationTests { @@ -1043,7 +1043,7 @@ public class AggregationTests {
/**
* @see <a href=
* "http://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati">Spring
* "https://stackoverflow.com/questions/18653574/spring-data-mongodb-aggregation-framework-invalid-reference-in-group-operati">Spring
* Data MongoDB - Aggregation Framework - invalid reference in group Operation</a>
*/
@Test // DATAMONGO-753
@ -1371,7 +1371,7 @@ public class AggregationTests { @@ -1371,7 +1371,7 @@ public class AggregationTests {
}
/**
* {@link http://stackoverflow.com/questions/24185987/using-root-inside-spring-data-mongodb-for-retrieving-whole-document}
* {@link https://stackoverflow.com/questions/24185987/using-root-inside-spring-data-mongodb-for-retrieving-whole-document}
*/
@Test // DATAMONGO-954
@MongoVersion(asOf = "2.6")

2
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ZipInfo.java

@ -8,7 +8,7 @@ import org.springframework.data.mongodb.core.mapping.Field; @@ -8,7 +8,7 @@ import org.springframework.data.mongodb.core.mapping.Field;
* Data model from mongodb reference data set
*
* @see <a href="https://docs.mongodb.org/manual/tutorial/aggregation-examples/">Aggregation Examples</a>
* @see <a href="http://media.mongodb.org/zips.json>zips.json</a>
* @see <a href="https://media.mongodb.org/zips.json>zips.json</a>
*/
class ZipInfo {

8
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/MappingMongoConverterUnitTests.java

@ -1006,19 +1006,19 @@ public class MappingMongoConverterUnitTests { @@ -1006,19 +1006,19 @@ public class MappingMongoConverterUnitTests {
public void writesURLsAsStringOutOfTheBox() throws Exception {
URLWrapper wrapper = new URLWrapper();
wrapper.url = new URL("http://springsource.org");
wrapper.url = new URL("https://springsource.org");
org.bson.Document sink = new org.bson.Document();
converter.write(wrapper, sink);
assertThat(sink.get("url"), is("http://springsource.org"));
assertThat(sink.get("url"), is("https://springsource.org"));
}
@Test // DATAMONGO-462
public void readsURLFromStringOutOfTheBox() throws Exception {
org.bson.Document document = new org.bson.Document("url", "http://springsource.org");
org.bson.Document document = new org.bson.Document("url", "https://springsource.org");
URLWrapper result = converter.read(URLWrapper.class, document);
assertThat(result.url, is(new URL("http://springsource.org")));
assertThat(result.url, is(new URL("https://springsource.org")));
}
@Test // DATAMONGO-485

2
src/main/asciidoc/new-features.adoc

@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
== What's New in Spring Data MongoDB 1.8
* `Criteria` offers support for creating `$geoIntersects`.
* Support for http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#expressions[SpEL expressions] in `@Query`.
* Support for https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#expressions[SpEL expressions] in `@Query`.
* `MongoMappingEvents` expose the collection name for which they are issued.
* Improved support for `<mongo:mongo-client credentials="..." />`.
* Improved index creation failure error message.

38
src/main/asciidoc/preface.adoc

@ -10,38 +10,38 @@ This section provides some basic introduction to Spring and Document databases. @@ -10,38 +10,38 @@ This section provides some basic introduction to Spring and Document databases.
[[get-started:first-steps:spring]]
== Learning Spring
Spring Data uses Spring framework's http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html[core] functionality, including:
Spring Data uses Spring framework's https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html[core] functionality, including:
* 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].
* https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#beans[IoC] container
* https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#validation[type conversion system]
* https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#expressions[expression language]
* https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/integration.html#jmx[JMX integration]
* https://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.
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 https://spring.io/docs[home page] for more information.
[[get-started:first-steps:nosql]]
== 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.
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 https://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 starting point 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 https://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://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] you can purchase.
* Karl Seguin's online book: http://openmymind.net/mongodb.pdf[The Little MongoDB Book].
* The https://docs.mongodb.org/manual/[manual] introduces MongoDB and contains links to getting started guides, reference documentation, and tutorials.
* The https://try.mongodb.org/[online shell] provides a convenient way to interact with a MongoDB instance in combination with the online https://docs.mongodb.org/manual/tutorial/getting-started/[tutorial.]
* MongoDB https://docs.mongodb.org/ecosystem/drivers/java/[Java Language Center].
* Several https://www.mongodb.org/books[books] you can purchase.
* Karl Seguin's online book: https://openmymind.net/mongodb.pdf[The Little MongoDB Book].
[[requirements]]
== Requirements
The Spring Data MongoDB 2.x binaries require JDK level 8.0 and above and http://spring.io/docs[Spring Framework] {springVersion} and above.
The Spring Data MongoDB 2.x binaries require JDK level 8.0 and above and https://spring.io/docs[Spring Framework] {springVersion} and above.
In terms of document stores, you need at least version 2.6 of http://www.mongodb.org/[MongoDB].
In terms of document stores, you need at least version 2.6 of https://www.mongodb.org/[MongoDB].
[[get-started:help]]
== Additional Help Resources
@ -49,12 +49,12 @@ In terms of document stores, you need at least version 2.6 of http://www.mongodb @@ -49,12 +49,12 @@ In terms of document stores, you need at least version 2.6 of http://www.mongodb
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 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.
Community Forum :: Spring Data on https://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 https://pivotal.io/[Pivotal Sofware, Inc.], the company behind Spring Data and Spring.
[[get-started:up-to-date]]
== Following Development
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]).
For information on the Spring Data Mongo source code repository, nightly builds, and snapshot artifacts, see the Spring Data Mongo https://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 https://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 https://spring.io[Portal]. You can also follow the Spring https://spring.io/blog[blog] or the project team on Twitter (https://twitter.com/SpringData[SpringData]).

4
src/main/asciidoc/reference/client-session-transactions.adoc

@ -81,7 +81,7 @@ template.withSession(session) @@ -81,7 +81,7 @@ template.withSession(session)
<1> Obtain a `Publisher` for new session retrieval.
<2> Use `ReactiveMongoOperation` methods as before. The `ClientSession` is obtained and applied automatically.
<3> Make sure to close the `ClientSession`.
<4> Nothing happens until you subscribe. See http://projectreactor.io/docs/core/release/reference/#reactive.subscribe[the Project Reactor Reference Guide] for details.
<4> Nothing happens until you subscribe. See https://projectreactor.io/docs/core/release/reference/#reactive.subscribe[the Project Reactor Reference Guide] for details.
====
By using a `Publisher` that provides the actual session, you can defer session acquisition to the point of actual subscription.
@ -175,7 +175,7 @@ CAUTION: Changing state of `MongoTemplate` during runtime (as you might think wo @@ -175,7 +175,7 @@ CAUTION: Changing state of `MongoTemplate` during runtime (as you might think wo
== Transactions with `MongoTransactionManager`
`MongoTransactionManager` is the gateway to the well known Spring transaction support. It lets applications use http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/transaction.html[the managed transaction features of Spring].
`MongoTransactionManager` is the gateway to the well known Spring transaction support. It lets applications use https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/html/transaction.html[the managed transaction features of Spring].
The `MongoTransactionManager` binds a `ClientSession` to the thread. `MongoTemplate` detects the session and operates on these resources which are associated with the transaction accordingly. `MongoTemplate` can also participate in other, ongoing transactions. The following example shows how to create and use transactions with a `MongoTransactionManager`:
.Transactions with `MongoTransactionManager`

12
src/main/asciidoc/reference/cross-store.adoc

@ -17,7 +17,7 @@ First, you need to add a dependency on the cross-store module. If you use Maven, @@ -17,7 +17,7 @@ First, you need to add a dependency on the cross-store module. If you use Maven,
[source,xml]
----
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
...
@ -42,7 +42,7 @@ Once you have added the dependency, you need to enable AspectJ for the project. @@ -42,7 +42,7 @@ Once you have added the dependency, you need to enable AspectJ for the project.
[source,xml]
----
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
...
@ -118,13 +118,13 @@ Finally, you need to configure your project to use MongoDB and also configure wh @@ -118,13 +118,13 @@ Finally, you need to configure your project to use MongoDB and also configure wh
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo.xsd
https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
https://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
https://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd">
https://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd">
...

8
src/main/asciidoc/reference/jmx.adoc

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
[[mongo.jmx]]
= JMX support
The JMX support for MongoDB exposes the results of executing the 'serverStatus' command on the admin database for a single MongoDB server instance. It also exposes an administrative MBean, `MongoAdmin`, that lets you perform administrative operations, such as dropping or creating a database. The JMX features build upon the JMX feature set available in the Spring Framework. See http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/integration.html#jmx[here] for more details.
The JMX support for MongoDB exposes the results of executing the 'serverStatus' command on the admin database for a single MongoDB server instance. It also exposes an administrative MBean, `MongoAdmin`, that lets you perform administrative operations, such as dropping or creating a database. The JMX features build upon the JMX feature set available in the Spring Framework. See https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/integration.html#jmx[here] for more details.
[[mongodb:jmx-configuration]]
== MongoDB JMX Configuration
@ -19,10 +19,10 @@ Spring's Mongo namespace lets you enable JMX functionality, as the following exa @@ -19,10 +19,10 @@ Spring's Mongo namespace lets you enable JMX functionality, as the following exa
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
https://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
https://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- Default bean name is 'mongo' -->
<mongo:mongo-client host="localhost" port="27017"/>

10
src/main/asciidoc/reference/mapping.adoc

@ -158,7 +158,7 @@ calling `get()` before the actual conversion @@ -158,7 +158,7 @@ calling `get()` before the actual conversion
| `URL`
| converter
| `{"website" : "http://projects.spring.io/spring-data-mongodb/" }`
| `{"website" : "https://projects.spring.io/spring-data-mongodb/" }`
| `Locale`
| converter
@ -313,9 +313,9 @@ Spring's MongoDB namespace lets you enable mapping functionality in XML, as the @@ -313,9 +313,9 @@ Spring's MongoDB namespace lets you enable mapping functionality in XML, as the
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- Default bean name is 'mongo' -->
<mongo:mongo-client host="localhost" port="27017"/>
@ -631,7 +631,7 @@ When storing and querying your objects, it is convenient to have a `MongoConvert @@ -631,7 +631,7 @@ When storing and querying your objects, it is convenient to have a `MongoConvert
To selectively handle the conversion yourself, register one or more one or more `org.springframework.core.convert.converter.Converter` instances with the `MongoConverter`.
NOTE: Spring 3.0 introduced a core.convert package that provides a general type conversion system. This is described in detail in the Spring reference documentation section entitled http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#validation["`Spring Type Conversion`"].
NOTE: Spring 3.0 introduced a core.convert package that provides a general type conversion system. This is described in detail in the Spring reference documentation section entitled https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#validation["`Spring Type Conversion`"].
You can use the `customConversions` method in `AbstractMongoConfiguration` to configure converters. The examples <<mapping-configuration, at the beginning of this chapter>> show how to perform the configuration using Java and XML.

8
src/main/asciidoc/reference/mongo-3.adoc

@ -28,8 +28,8 @@ Generally, you should use the `<mongo:mongo-client ... />` and `<mongo:client-op @@ -28,8 +28,8 @@ Generally, you should use the `<mongo:mongo-client ... />` and `<mongo:client-op
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
<mongo:mongo-client host="127.0.0.1" port="27017">
<mongo:client-options write-concern="NORMAL" />
@ -75,8 +75,8 @@ In order to use authentication with XML configuration, you can use the `credenti @@ -75,8 +75,8 @@ In order to use authentication with XML configuration, you can use the `credenti
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
<mongo:mongo-client credentials="user:password@database" />

4
src/main/asciidoc/reference/mongo-repositories.adoc

@ -52,9 +52,9 @@ Right now this interface serves only to provide type information, but we can add @@ -52,9 +52,9 @@ Right now this interface serves only to provide type information, but we can add
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
https://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd">
https://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd">
<mongo:mongo-client id="mongoClient" />

50
src/main/asciidoc/reference/mongodb.adoc

@ -20,9 +20,9 @@ For most tasks, you should use `MongoTemplate` or the Repository support, which @@ -20,9 +20,9 @@ For most tasks, you should use `MongoTemplate` or the Repository support, which
[[mongodb-getting-started]]
== Getting Started
An easy way to bootstrap setting up a working environment is to create a Spring-based project in http://spring.io/tools/sts[STS].
An easy way to bootstrap setting up a working environment is to create a Spring-based project in https://spring.io/tools/sts[STS].
First, you need to set up a running MongoDB server. Refer to the http://docs.mongodb.org/manual/core/introduction/[MongoDB Quick Start guide] for an explanation on how to startup a MongoDB instance. Once installed, starting MongoDB is typically a matter of running the following command: `${MONGO_HOME}/bin/mongod`
First, you need to set up a running MongoDB server. Refer to the https://docs.mongodb.org/manual/core/introduction/[MongoDB Quick Start guide] for an explanation on how to startup a MongoDB instance. Once installed, starting MongoDB is typically a matter of running the following command: `${MONGO_HOME}/bin/mongod`
To create a Spring project in STS:
@ -57,12 +57,12 @@ To create a Spring project in STS: @@ -57,12 +57,12 @@ To create a Spring project in STS:
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>http://repo.spring.io/libs-milestone</url>
<url>https://repo.spring.io/libs-milestone</url>
</repository>
</repositories>
----
The repository is also http://repo.spring.io/milestone/org/springframework/data/[browseable here].
The repository is also https://repo.spring.io/milestone/org/springframework/data/[browseable here].
You may also want to set the logging level to `DEBUG` to see some additional information. To do so, edit the `log4j.properties` file to have the following content:
@ -167,7 +167,7 @@ There is a https://github.com/spring-projects/spring-data-examples[GitHub reposi @@ -167,7 +167,7 @@ There is a https://github.com/spring-projects/spring-data-examples[GitHub reposi
One of the first tasks when using MongoDB and Spring is to create a `com.mongodb.MongoClient` or `com.mongodb.client.MongoClient` object using the IoC container. There are two main ways to do this, either by using Java-based bean metadata or by using XML-based bean metadata. Both are discussed in the following sections.
NOTE: For those not familiar with how to configure the Spring container using Java-based bean metadata instead of XML-based metadata, see the high-level introduction in the reference docs http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html#new-java-configuration[here] as well as the detailed documentation http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#beans-java-instantiating-container[here].
NOTE: For those not familiar with how to configure the Spring container using Java-based bean metadata instead of XML-based metadata, see the high-level introduction in the reference docs https://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/new-in-3.0.html#new-java-configuration[here] as well as the detailed documentation https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#beans-java-instantiating-container[here].
[[mongo.mongo-java-config]]
=== Registering a Mongo Instance by using Java-based Metadata
@ -191,7 +191,7 @@ public class AppConfig { @@ -191,7 +191,7 @@ public class AppConfig {
----
====
This approach lets you use the standard `com.mongodb.MongoClient` instance, with the container using Spring's `MongoClientFactoryBean`. As compared to instantiating a `com.mongodb.MongoClient` instance directly, the `FactoryBean` has the added advantage of also providing the container with an `ExceptionTranslator` implementation that translates MongoDB exceptions to exceptions in Spring's portable `DataAccessException` hierarchy for data access classes annotated with the `@Repository` annotation. This hierarchy and the use of `@Repository` is described in http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html[Spring's DAO support features].
This approach lets you use the standard `com.mongodb.MongoClient` instance, with the container using Spring's `MongoClientFactoryBean`. As compared to instantiating a `com.mongodb.MongoClient` instance directly, the `FactoryBean` has the added advantage of also providing the container with an `ExceptionTranslator` implementation that translates MongoDB exceptions to exceptions in Spring's portable `DataAccessException` hierarchy for data access classes annotated with the `@Repository` annotation. This hierarchy and the use of `@Repository` is described in https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html[Spring's DAO support features].
The following example shows an example of a Java-based bean metadata that supports exception translation on `@Repository` annotated classes:
@ -234,10 +234,10 @@ To use the Mongo namespace elements, you need to reference the Mongo schema, as @@ -234,10 +234,10 @@ To use the Mongo namespace elements, you need to reference the Mongo schema, as
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation=
"http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo.xsd
https://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
https://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Default bean name is 'mongo' -->
<mongo:mongo-client host="localhost" port="27017"/>
@ -1350,7 +1350,7 @@ The geo-near operations return a `GeoResults` wrapper object that encapsulates ` @@ -1350,7 +1350,7 @@ The geo-near operations return a `GeoResults` wrapper object that encapsulates `
[[mongo.geo-json]]
=== GeoJSON Support
MongoDB supports http://geojson.org/[GeoJSON] and simple (legacy) coordinate pairs for geospatial data. Those formats can both be used for storing as well as querying data. See the http://docs.mongodb.org/manual/core/2dsphere/#geospatial-indexes-store-geojson/[MongoDB manual on GeoJSON support] to learn about requirements and restrictions.
MongoDB supports http://geojson.org/[GeoJSON] and simple (legacy) coordinate pairs for geospatial data. Those formats can both be used for storing as well as querying data. See the https://docs.mongodb.org/manual/core/2dsphere/#geospatial-indexes-store-geojson/[MongoDB manual on GeoJSON support] to learn about requirements and restrictions.
==== GeoJSON Types in Domain Classes
@ -1609,7 +1609,7 @@ Returning the 3 Documents just like the GeoJSON variant: @@ -1609,7 +1609,7 @@ Returning the 3 Documents just like the GeoJSON variant:
[[mongo.textsearch]]
=== Full-text Queries
Since version 2.6 of MongoDB, you can run full-text queries by using the `$text` operator. Methods and operations specific to full-text queries are available in `TextQuery` and `TextCriteria`. When doing full text search, see the http://docs.mongodb.org/manual/reference/operator/query/text/#behavior[MongoDB reference] for its behavior and limitations.
Since version 2.6 of MongoDB, you can run full-text queries by using the `$text` operator. Methods and operations specific to full-text queries are available in `TextQuery` and `TextCriteria`. When doing full text search, see the https://docs.mongodb.org/manual/reference/operator/query/text/#behavior[MongoDB reference] for its behavior and limitations.
==== Full-text Search
@ -2051,7 +2051,7 @@ include::query-by-example.adoc[leveloffset=+1] @@ -2051,7 +2051,7 @@ include::query-by-example.adoc[leveloffset=+1]
You can query MongoDB by using Map-Reduce, which is useful for batch processing, for data aggregation, and for when the query language does not fulfill your needs.
Spring provides integration with MongoDB's Map-Reduce by providing methods on `MongoOperations` to simplify the creation and execution of Map-Reduce operations. It can convert the results of a Map-Reduce operation to a POJO and integrates with Spring's http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#resources[Resource abstraction]. This lets you place your JavaScript files on the file system, classpath, HTTP server, or any other Spring Resource implementation and then reference the JavaScript resources through an easy URI style syntax -- for example, `classpath:reduce.js;`. Externalizing JavaScript code in files is often preferable to embedding them as Java strings in your code. Note that you can still pass JavaScript code as Java strings if you prefer.
Spring provides integration with MongoDB's Map-Reduce by providing methods on `MongoOperations` to simplify the creation and execution of Map-Reduce operations. It can convert the results of a Map-Reduce operation to a POJO and integrates with Spring's https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#resources[Resource abstraction]. This lets you place your JavaScript files on the file system, classpath, HTTP server, or any other Spring Resource implementation and then reference the JavaScript resources through an easy URI style syntax -- for example, `classpath:reduce.js;`. Externalizing JavaScript code in files is often preferable to embedding them as Java strings in your code. Note that you can still pass JavaScript code as Java strings if you prefer.
[[mongo.mapreduce.example]]
=== Example Usage
@ -2197,9 +2197,9 @@ scriptOps.call("echo", "execute script via name"); <3> @@ -2197,9 +2197,9 @@ scriptOps.call("echo", "execute script via name"); <3>
[[mongo.group]]
== Group Operations
As an alternative to using Map-Reduce to perform data aggregation, you can use the http://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Group[`group` operation] which feels similar to using SQL's group by query style, so it may feel more approachable vs. using Map-Reduce. Using the group operations does have some limitations, for example it is not supported in a shared environment and it returns the full result set in a single BSON object, so the result should be small, less than 10,000 keys.
As an alternative to using Map-Reduce to perform data aggregation, you can use the https://www.mongodb.org/display/DOCS/Aggregation#Aggregation-Group[`group` operation] which feels similar to using SQL's group by query style, so it may feel more approachable vs. using Map-Reduce. Using the group operations does have some limitations, for example it is not supported in a shared environment and it returns the full result set in a single BSON object, so the result should be small, less than 10,000 keys.
Spring provides integration with MongoDB's group operation by providing methods on MongoOperations to simplify the creation and execution of group operations. It can convert the results of the group operation to a POJO and also integrates with Spring's http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#resources[Resource abstraction] abstraction. This will let you place your JavaScript files on the file system, classpath, http server or any other Spring Resource implementation and then reference the JavaScript resources via an easy URI style syntax, e.g. 'classpath:reduce.js;. Externalizing JavaScript code in files if often preferable to embedding them as Java strings in your code. Note that you can still pass JavaScript code as Java strings if you prefer.
Spring provides integration with MongoDB's group operation by providing methods on MongoOperations to simplify the creation and execution of group operations. It can convert the results of the group operation to a POJO and also integrates with Spring's https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#resources[Resource abstraction] abstraction. This will let you place your JavaScript files on the file system, classpath, http server or any other Spring Resource implementation and then reference the JavaScript resources via an easy URI style syntax, e.g. 'classpath:reduce.js;. Externalizing JavaScript code in files if often preferable to embedding them as Java strings in your code. Note that you can still pass JavaScript code as Java strings if you prefer.
[[mongo.group.example]]
=== Example Usage
@ -2294,7 +2294,7 @@ GroupByResults<XObject> results = mongoTemplate.group(where("x").gt(0), @@ -2294,7 +2294,7 @@ GroupByResults<XObject> results = mongoTemplate.group(where("x").gt(0),
Spring Data MongoDB provides support for the Aggregation Framework introduced to MongoDB in version 2.2.
For further information, see the full http://docs.mongodb.org/manual/aggregation/[reference documentation] of the aggregation framework and other data aggregation tools for MongoDB.
For further information, see the full https://docs.mongodb.org/manual/aggregation/[reference documentation] of the aggregation framework and other data aggregation tools for MongoDB.
[[mongo.aggregation.basic-concepts]]
=== Basic Concepts
@ -2439,7 +2439,7 @@ project().and("firstname").as("name"), sort(ASC, "firstname") @@ -2439,7 +2439,7 @@ project().and("firstname").as("name"), sort(ASC, "firstname")
----
====
More examples for project operations can be found in the `AggregationTests` class. Note that further details regarding the projection expressions can be found in the http://docs.mongodb.org/manual/reference/operator/aggregation/project/#pipe._S_project[corresponding section] of the MongoDB Aggregation Framework reference documentation.
More examples for project operations can be found in the `AggregationTests` class. Note that further details regarding the projection expressions can be found in the https://docs.mongodb.org/manual/reference/operator/aggregation/project/#pipe._S_project[corresponding section] of the MongoDB Aggregation Framework reference documentation.
[[mongo.aggregation.facet]]
=== Faceted Classification
@ -2489,8 +2489,8 @@ bucketAuto("price", 5).andOutput("title").push().as("titles"); @@ -2489,8 +2489,8 @@ bucketAuto("price", 5).andOutput("title").push().as("titles");
To create output fields in buckets, bucket operations can use `AggregationExpression` through `andOutput()` and <<mongo.aggregation.projection.expressions, SpEL expressions>> through `andOutputExpression()`.
Note that further details regarding bucket expressions can be found in the http://docs.mongodb.org/manual/reference/operator/aggregation/bucket/[`$bucket` section] and
http://docs.mongodb.org/manual/reference/operator/aggregation/bucketAuto/[`$bucketAuto` section] of the MongoDB Aggregation Framework reference documentation.
Note that further details regarding bucket expressions can be found in the https://docs.mongodb.org/manual/reference/operator/aggregation/bucket/[`$bucket` section] and
https://docs.mongodb.org/manual/reference/operator/aggregation/bucketAuto/[`$bucketAuto` section] of the MongoDB Aggregation Framework reference documentation.
==== Multi-faceted Aggregation
@ -2520,7 +2520,7 @@ facet(project("title").and("publicationDate").extractYear().as("publicationYear" @@ -2520,7 +2520,7 @@ facet(project("title").and("publicationDate").extractYear().as("publicationYear"
----
====
Note that further details regarding facet operation can be found in the http://docs.mongodb.org/manual/reference/operator/aggregation/facet/[`$facet` section] of the MongoDB Aggregation Framework reference documentation.
Note that further details regarding facet operation can be found in the https://docs.mongodb.org/manual/reference/operator/aggregation/facet/[`$facet` section] of the MongoDB Aggregation Framework reference documentation.
[[mongo.aggregation.sort-by-count]]
==== Sort By Count
@ -2665,7 +2665,7 @@ Note that the input collection is explicitly specified as the `tags` parameter t @@ -2665,7 +2665,7 @@ Note that the input collection is explicitly specified as the `tags` parameter t
[[mongo.aggregation.examples.example2]]
===== Aggregation Framework Example 2
This example is based on the http://docs.mongodb.org/manual/tutorial/aggregation-examples/#largest-and-smallest-cities-by-state[Largest and Smallest Cities by State] example from the MongoDB Aggregation Framework documentation. We added additional sorting to produce stable results with different MongoDB versions. Here we want to return the smallest and largest cities by population for each state by using the aggregation framework. This example demonstrates grouping, sorting, and projections (selection).
This example is based on the https://docs.mongodb.org/manual/tutorial/aggregation-examples/#largest-and-smallest-cities-by-state[Largest and Smallest Cities by State] example from the MongoDB Aggregation Framework documentation. We added additional sorting to produce stable results with different MongoDB versions. Here we want to return the smallest and largest cities by population for each state by using the aggregation framework. This example demonstrates grouping, sorting, and projections (selection).
[source,java]
----
@ -2731,7 +2731,7 @@ Note that we derive the name of the input collection from the `ZipInfo` class pa @@ -2731,7 +2731,7 @@ Note that we derive the name of the input collection from the `ZipInfo` class pa
[[mongo.aggregation.examples.example3]]
===== Aggregation Framework Example 3
This example is based on the http://docs.mongodb.org/manual/tutorial/aggregation-examples/#states-with-populations-over-10-million[States with Populations Over 10 Million] example from the MongoDB Aggregation Framework documentation. We added additional sorting to produce stable results with different MongoDB versions. Here we want to return all states with a population greater than 10 million, using the aggregation framework. This example demonstrates grouping, sorting, and matching (filtering).
This example is based on the https://docs.mongodb.org/manual/tutorial/aggregation-examples/#states-with-populations-over-10-million[States with Populations Over 10 Million] example from the MongoDB Aggregation Framework documentation. We added additional sorting to produce stable results with different MongoDB versions. Here we want to return all states with a population greater than 10 million, using the aggregation framework. This example demonstrates grouping, sorting, and matching (filtering).
[source,java]
----
@ -2937,7 +2937,7 @@ To have more fine-grained control over the mapping process, you can register Spr @@ -2937,7 +2937,7 @@ To have more fine-grained control over the mapping process, you can register Spr
The `MappingMongoConverter` checks to see if any Spring converters can handle a specific class before attempting to map the object itself. To 'hijack' the normal mapping strategies of the `MappingMongoConverter`, perhaps for increased performance or other custom mapping needs, you first need to create an implementation of the Spring `Converter` interface and then register it with the `MappingConverter`.
NOTE: For more information on the Spring type conversion service, see the reference docs http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#validation[here].
NOTE: For more information on the Spring type conversion service, see the reference docs https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#validation[here].
[[mongo.custom-converters.writer]]
=== Saving by Using a Registered Spring Converter
@ -3178,7 +3178,7 @@ NOTE: Lifecycle events are only emitted for root level types. Complex types used @@ -3178,7 +3178,7 @@ NOTE: Lifecycle events are only emitted for root level types. Complex types used
The Spring framework provides exception translation for a wide variety of database and mapping technologies. This has traditionally been for JDBC and JPA. The Spring support for MongoDB extends this feature to the MongoDB Database by providing an implementation of the `org.springframework.dao.support.PersistenceExceptionTranslator` interface.
The motivation behind mapping to Spring's http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html#dao-exceptions[consistent data access exception hierarchy] is that you are then able to write portable and descriptive exception handling code without resorting to coding against MongoDB error codes. All of Spring's data access exceptions are inherited from the root `DataAccessException` class so that you can be sure to catch all database related exception within a single try-catch block. Note that not all exceptions thrown by the MongoDB driver inherit from the `MongoException` class. The inner exception and message are preserved so that no information is lost.
The motivation behind mapping to Spring's https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html#dao-exceptions[consistent data access exception hierarchy] is that you are then able to write portable and descriptive exception handling code without resorting to coding against MongoDB error codes. All of Spring's data access exceptions are inherited from the root `DataAccessException` class so that you can be sure to catch all database related exception within a single try-catch block. Note that not all exceptions thrown by the MongoDB driver inherit from the `MongoException` class. The inner exception and message are preserved so that no information is lost.
Some of the mappings performed by the `MongoExceptionTranslator` are `com.mongodb.Network to DataAccessResourceFailureException` and `MongoException` error codes 1003, 12001, 12010, 12011, and 12012 to `InvalidDataAccessApiUsageException`. Look into the implementation for more details on the mapping.
@ -3248,9 +3248,9 @@ The corresponding XML configuration follows: @@ -3248,9 +3248,9 @@ The corresponding XML configuration follows:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo.xsd
https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
https://www.springframework.org/schema/beans/spring-beans.xsd">
<mongo:db-factory id="mongoDbFactory" dbname="database" />
<mongo:mapping-converter id="converter" />

2
src/main/asciidoc/reference/reactive-mongo-repositories.adoc

@ -8,7 +8,7 @@ This chapter describes the specialties for reactive repository support for Mongo @@ -8,7 +8,7 @@ This chapter describes the specialties for reactive repository support for Mongo
The reactive space offers various reactive composition libraries. The most common libraries are https://github.com/ReactiveX/RxJava[RxJava] and https://projectreactor.io/[Project Reactor].
Spring Data MongoDB is built on top of the https://mongodb.github.io/mongo-java-driver-reactivestreams/[MongoDB Reactive Streams] driver, to provide maximal interoperability by relying on the http://www.reactive-streams.org/[Reactive Streams] initiative. Static APIs, such as `ReactiveMongoOperations`, are provided by using Project Reactor's `Flux` and `Mono` types. Project Reactor offers various adapters to convert reactive wrapper types (`Flux` to `Observable` and vice versa), but conversion can easily clutter your code.
Spring Data MongoDB is built on top of the https://mongodb.github.io/mongo-java-driver-reactivestreams/[MongoDB Reactive Streams] driver, to provide maximal interoperability by relying on the https://www.reactive-streams.org/[Reactive Streams] initiative. Static APIs, such as `ReactiveMongoOperations`, are provided by using Project Reactor's `Flux` and `Mono` types. Project Reactor offers various adapters to convert reactive wrapper types (`Flux` to `Observable` and vice versa), but conversion can easily clutter your code.
Spring Data's Repository abstraction is a dynamic API, mostly defined by you and your requirements as you declare query methods. Reactive MongoDB repositories can be implemented by using either RxJava or Project Reactor wrapper types by extending from one of the following library-specific repository interfaces:

6
src/main/asciidoc/reference/reactive-mongodb.adoc

@ -19,7 +19,7 @@ For most tasks, you should use `ReactiveMongoTemplate` or the repository support @@ -19,7 +19,7 @@ For most tasks, you should use `ReactiveMongoTemplate` or the repository support
Spring MongoDB support requires MongoDB 2.6 or higher and Java SE 8 or higher.
First, you need to set up a running MongoDB server. Refer to the http://docs.mongodb.org/manual/core/introduction/[MongoDB Quick Start guide] for an explanation on how to startup a MongoDB instance. Once installed, starting MongoDB is typically a matter of executing the following command: `${MONGO_HOME}/bin/mongod`
First, you need to set up a running MongoDB server. Refer to the https://docs.mongodb.org/manual/core/introduction/[MongoDB Quick Start guide] for an explanation on how to startup a MongoDB instance. Once installed, starting MongoDB is typically a matter of executing the following command: `${MONGO_HOME}/bin/mongod`
To create a Spring project in STS, go to File -> New -> Spring Template Project -> Simple Spring Utility Project and press Yes when prompted. Then enter a project and a package name, such as org.spring.mongodb.example.
@ -164,7 +164,7 @@ public class AppConfig { @@ -164,7 +164,7 @@ public class AppConfig {
This approach lets you use the standard `com.mongodb.reactivestreams.client.MongoClient` API (which you may already know).
An alternative is to register an instance of `com.mongodb.reactivestreams.client.MongoClient` instance with the container by using Spring's `ReactiveMongoClientFactoryBean`. As compared to instantiating a `com.mongodb.reactivestreams.client.MongoClient` instance directly, the `FactoryBean` approach has the added advantage of also providing the container with an `ExceptionTranslator` implementation that translates MongoDB exceptions to exceptions in Spring's portable `DataAccessException` hierarchy for data access classes annotated with the `@Repository` annotation. This hierarchy and use of `@Repository` is described in http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html[Spring's DAO support features].
An alternative is to register an instance of `com.mongodb.reactivestreams.client.MongoClient` instance with the container by using Spring's `ReactiveMongoClientFactoryBean`. As compared to instantiating a `com.mongodb.reactivestreams.client.MongoClient` instance directly, the `FactoryBean` approach has the added advantage of also providing the container with an `ExceptionTranslator` implementation that translates MongoDB exceptions to exceptions in Spring's portable `DataAccessException` hierarchy for data access classes annotated with the `@Repository` annotation. This hierarchy and use of `@Repository` is described in https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/data-access.html[Spring's DAO support features].
The following example shows Java-based bean metadata that supports exception translation on `@Repository` annotated classes:
@ -532,7 +532,7 @@ class ReactiveGridFsClient { @@ -532,7 +532,7 @@ class ReactiveGridFsClient {
The `store(…)` operations take an `Publisher<DataBuffer>`, a filename, and (optionally) metadata information about the file to store. The metadata can be an arbitrary object, which will be marshaled by the `MongoConverter` configured with the `ReactiveGridFsTemplate`. Alternatively, you can also provide a `Document`.
NOTE: MongoDB's driver uses `AsyncInputStream` and `AsyncOutputStream` interfaces to exchange binary streams. Spring Data MongoDB adapts these interfaces to `Publisher<DataBuffer>`. Read more about `DataBuffer` in http://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#databuffers[Spring's reference documentation].
NOTE: MongoDB's driver uses `AsyncInputStream` and `AsyncOutputStream` interfaces to exchange binary streams. Spring Data MongoDB adapts these interfaces to `Publisher<DataBuffer>`. Read more about `DataBuffer` in https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/core.html#databuffers[Spring's reference documentation].
You can read files from the filesystem through either the `find(…)` or the `getResources(…)` methods. Let's have a look at the `find(…)` methods first. You can either find a single file or multiple files that match a `Query`. You can use the `GridFsCriteria` helper class to define queries. It provides static factory methods to encapsulate default metadata fields (such as `whereFilename()` and `whereContentType()`) or a custom one through `whereMetaData()`. The following example shows how to use `ReactiveGridFsTemplate` to query for files:

2
src/main/resources/license.txt

@ -207,7 +207,7 @@ similar licenses that require the source code and/or modifications to @@ -207,7 +207,7 @@ similar licenses that require the source code and/or modifications to
source code to be made available (as would be noted above), you may obtain a
copy of the source code corresponding to the binaries for such open source
components and modifications thereto, if any, (the "Source Files"), by
downloading the Source Files from http://www.springsource.org/download,
downloading the Source Files from https://www.springsource.org/download,
or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview
Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All
such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General

Loading…
Cancel
Save