Files
spring-integration-samples/basic/mongodb
Artem Bilan cb052d2d98 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://blueprintcss.org (200) with 3 occurrences could not be migrated:
   ([https](https://blueprintcss.org) result AnnotatedConnectException).
* [ ] http://jmesnil.net/ (200) with 1 occurrences could not be migrated:
   ([https](https://jmesnil.net/) result ConnectTimeoutException).
* [ ] http://jtds.sourceforge.net (200) with 1 occurrences could not be migrated:
   ([https](https://jtds.sourceforge.net) result AnnotatedConnectException).
* [ ] http://www.jmesnil.net/stomp-websocket/doc/ (301) with 1 occurrences could not be migrated:
   ([https](https://www.jmesnil.net/stomp-websocket/doc/) result ConnectTimeoutException).
* [ ] http://enfranchisedmind.com/blog/posts/jquery-periodicalupdater-ajax-polling/ (404) with 1 occurrences could not be migrated:
   ([https](https://enfranchisedmind.com/blog/posts/jquery-periodicalupdater-ajax-polling/) result SSLHandshakeException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK.
However, the https status was the same as the http request or http redirected to an https URL, so they were migrated.
Your review is recommended.

* [ ] http://smokejumperit.com (301) with 1 occurrences migrated to:
  https://blog.enfranchisedmind.com/posts/author/candide/?coming_from=smokejumperit.com ([https](https://smokejumperit.com) result UnknownHostException).
* [ ] http://sockjs.org (303) with 2 occurrences migrated to:
  https://github.com/sockjs/sockjs-client ([https](https://sockjs.org) result AnnotatedConnectException).
* [ ] http://platform.beta.mapquest.com/traffic/ (UnknownHostException) with 1 occurrences migrated to:
  https://platform.beta.mapquest.com/traffic/ ([https](https://platform.beta.mapquest.com/traffic/) result UnknownHostException).
* [ ] http://en.wikipedia.org/wiki/Caf%C3%A9 (301) with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Caf%25C3%25A9 ([https](https://en.wikipedia.org/wiki/Caf%C3%A9) result 400).
* [ ] http://ws.cdyne.com/WeatherWS/ (403) with 3 occurrences migrated to:
  https://ws.cdyne.com/WeatherWS/ ([https](https://ws.cdyne.com/WeatherWS/) result 403).
* [ ] http://blogs.oracle.com/swinger/entry/collections_trick_i_lru_cache (404) with 1 occurrences migrated to:
  https://blogs.oracle.com/swinger/entry/collections_trick_i_lru_cache ([https](https://blogs.oracle.com/swinger/entry/collections_trick_i_lru_cache) result 404).
* [ ] http://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/docs/latest-ga/reference/html/samples.html ([https](https://static.springsource.org/spring-integration/docs/latest-ga/reference/html/samples.html) result 404).
* [ ] http://static.springsource.org/spring-integration/reference/html/messaging-routing-chapter.html (301) with 3 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/html/messaging-routing-chapter.html ([https](https://static.springsource.org/spring-integration/reference/html/messaging-routing-chapter.html) result 404).
* [ ] http://docs.spring.io/spring-integration/reference/html/samples.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/html/samples.html ([https](https://docs.spring.io/spring-integration/reference/html/samples.html) result 404).
* [ ] http://static.springsource.org/spring-integration/reference/htmlsingle/ (301) with 4 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/htmlsingle/ ([https](https://static.springsource.org/spring-integration/reference/htmlsingle/) result 404).
* [ ] http://xml.apache.org/xslt (404) with 3 occurrences migrated to:
  https://xml.apache.org/xslt ([https](https://xml.apache.org/xslt) result 404).
* [ ] http://customcode.info (503) with 1 occurrences migrated to:
  https://customcode.info ([https](https://customcode.info) result 503).

## 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://activemq.apache.org/ with 1 occurrences migrated to:
  https://activemq.apache.org/ ([https](https://activemq.apache.org/) result 200).
* [ ] http://db.apache.org/derby/ with 1 occurrences migrated to:
  https://db.apache.org/derby/ ([https](https://db.apache.org/derby/) result 200).
* [ ] http://developer.mapquest.com/ with 1 occurrences migrated to:
  https://developer.mapquest.com/ ([https](https://developer.mapquest.com/) result 200).
* [ ] http://docs.oracle.com/javase/tutorial/jmx/mbeans/index.html with 1 occurrences migrated to:
  https://docs.oracle.com/javase/tutorial/jmx/mbeans/index.html ([https](https://docs.oracle.com/javase/tutorial/jmx/mbeans/index.html) result 200).
* [ ] http://static.springsource.org/spring-integration/api/org/springframework/integration/ip/tcp/serializer/ByteArrayCrLfSerializer.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/api/org/springframework/integration/ip/tcp/serializer/ByteArrayCrLfSerializer.html ([https](https://static.springsource.org/spring-integration/api/org/springframework/integration/ip/tcp/serializer/ByteArrayCrLfSerializer.html) result 200).
* [ ] http://static.springsource.org/spring-integration/api/org/springframework/integration/ip/tcp/serializer/ByteArrayStxEtxSerializer.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/api/org/springframework/integration/ip/tcp/serializer/ByteArrayStxEtxSerializer.html ([https](https://static.springsource.org/spring-integration/api/org/springframework/integration/ip/tcp/serializer/ByteArrayStxEtxSerializer.html) result 200).
* [ ] http://static.springsource.org/spring-integration/api/org/springframework/integration/store/MessageGroupStoreReaper.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/api/org/springframework/integration/store/MessageGroupStoreReaper.html ([https](https://static.springsource.org/spring-integration/api/org/springframework/integration/store/MessageGroupStoreReaper.html) result 200).
* [ ] http://static.springsource.org/spring-integration/docs/2.2.0.RC3/reference/htmlsingle/ (301) with 2 occurrences migrated to:
  https://docs.spring.io/spring-integration/docs/2.2.0.RC3/reference/htmlsingle/ ([https](https://static.springsource.org/spring-integration/docs/2.2.0.RC3/reference/htmlsingle/) result 200).
* [ ] http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/convert/ConversionService.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/convert/ConversionService.html ([https](https://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/convert/ConversionService.html) result 200).
* [ ] http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/serializer/Deserializer.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/serializer/Deserializer.html ([https](https://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/serializer/Deserializer.html) result 200).
* [ ] http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/serializer/Serializer.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/serializer/Serializer.html ([https](https://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/serializer/Serializer.html) result 200).
* [ ] http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html (301) with 1 occurrences migrated to:
  https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html ([https](https://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html) result 200).
* [ ] http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol ([https](https://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol) result 200).
* [ ] http://en.wikipedia.org/wiki/Binary_Synchronous_Communications with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Binary_Synchronous_Communications ([https](https://en.wikipedia.org/wiki/Binary_Synchronous_Communications) result 200).
* [ ] http://en.wikipedia.org/wiki/CURL with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/CURL ([https](https://en.wikipedia.org/wiki/CURL) result 200).
* [ ] http://en.wikipedia.org/wiki/Control_character with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Control_character ([https](https://en.wikipedia.org/wiki/Control_character) result 200).
* [ ] http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol with 2 occurrences migrated to:
  https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol ([https](https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol) result 200).
* [ ] http://en.wikipedia.org/wiki/Java_Message_Service with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Java_Message_Service ([https](https://en.wikipedia.org/wiki/Java_Message_Service) result 200).
* [ ] http://en.wikipedia.org/wiki/Netcat with 2 occurrences migrated to:
  https://en.wikipedia.org/wiki/Netcat ([https](https://en.wikipedia.org/wiki/Netcat) result 200).
* [ ] http://en.wikipedia.org/wiki/Newline with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Newline ([https](https://en.wikipedia.org/wiki/Newline) result 200).
* [ ] http://en.wikipedia.org/wiki/OAuth with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/OAuth ([https](https://en.wikipedia.org/wiki/OAuth) result 200).
* [ ] http://en.wikipedia.org/wiki/SOAP with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/SOAP ([https](https://en.wikipedia.org/wiki/SOAP) result 200).
* [ ] http://en.wikipedia.org/wiki/Telnet with 2 occurrences migrated to:
  https://en.wikipedia.org/wiki/Telnet ([https](https://en.wikipedia.org/wiki/Telnet) result 200).
* [ ] http://en.wikipedia.org/wiki/Transmission_Control_Protocol with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/Transmission_Control_Protocol ([https](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) result 200).
* [ ] http://en.wikipedia.org/wiki/XML with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/XML ([https](https://en.wikipedia.org/wiki/XML) result 200).
* [ ] http://en.wikipedia.org/wiki/XPath with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/XPath ([https](https://en.wikipedia.org/wiki/XPath) result 200).
* [ ] http://en.wikipedia.org/wiki/XSLT with 1 occurrences migrated to:
  https://en.wikipedia.org/wiki/XSLT ([https](https://en.wikipedia.org/wiki/XSLT) result 200).
* [ ] http://hillert.blogspot.com/2011/01/marshal-json-data-using-jackson-in.html with 1 occurrences migrated to:
  https://hillert.blogspot.com/2011/01/marshal-json-data-using-jackson-in.html ([https](https://hillert.blogspot.com/2011/01/marshal-json-data-using-jackson-in.html) result 200).
* [ ] http://hillert.blogspot.com/2011/05/testing-email-notifications-with-apache.html with 1 occurrences migrated to:
  https://hillert.blogspot.com/2011/05/testing-email-notifications-with-apache.html ([https](https://hillert.blogspot.com/2011/05/testing-email-notifications-with-apache.html) result 200).
* [ ] http://james.apache.org/ with 1 occurrences migrated to:
  https://james.apache.org/ ([https](https://james.apache.org/) result 200).
* [ ] http://james.apache.org/server/3/quick-start.html with 1 occurrences migrated to:
  https://james.apache.org/server/3/quick-start.html ([https](https://james.apache.org/server/3/quick-start.html) result 200).
* [ ] http://jquery.com/ with 1 occurrences migrated to:
  https://jquery.com/ ([https](https://jquery.com/) result 200).
* [ ] http://meyerweb.com/eric/tools/dencoder/ with 1 occurrences migrated to:
  https://meyerweb.com/eric/tools/dencoder/ ([https](https://meyerweb.com/eric/tools/dencoder/) result 200).
* [ ] http://projects.spring.io/spring-integration/ with 2 occurrences migrated to:
  https://projects.spring.io/spring-integration/ ([https](https://projects.spring.io/spring-integration/) result 200).
* [ ] http://sizzlejs.com/ with 1 occurrences migrated to:
  https://sizzlejs.com/ ([https](https://sizzlejs.com/) result 200).
* [ ] http://tomcat.apache.org/ with 1 occurrences migrated to:
  https://tomcat.apache.org/ ([https](https://tomcat.apache.org/) result 200).
* [ ] http://twitter.com/huntchr with 1 occurrences migrated to:
  https://twitter.com/huntchr ([https](https://twitter.com/huntchr) result 200).
* [ ] http://www.360innovate.co.uk with 1 occurrences migrated to:
  https://www.360innovate.co.uk ([https](https://www.360innovate.co.uk) result 200).
* [ ] http://www.amqp.org/ with 1 occurrences migrated to:
  https://www.amqp.org/ ([https](https://www.amqp.org/) result 200).
* [ ] http://tempuri.org/ (302) with 1 occurrences migrated to:
  https://www.bing.com/ ([https](https://tempuri.org/) result 200).
* [ ] http://www.eclipse.org/jetty/ with 1 occurrences migrated to:
  https://www.eclipse.org/jetty/ ([https](https://www.eclipse.org/jetty/) result 200).
* [ ] http://www.eaipatterns.com/ (302) with 2 occurrences migrated to:
  https://www.enterpriseintegrationpatterns.com/ ([https](https://www.eaipatterns.com/) result 200).
* [ ] http://www.eaipatterns.com/gregor.html (302) with 1 occurrences migrated to:
  https://www.enterpriseintegrationpatterns.com/gregor.html ([https](https://www.eaipatterns.com/gregor.html) result 200).
* [ ] http://www.eaipatterns.com/ramblings/18_starbucks.html (302) with 1 occurrences migrated to:
  https://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html ([https](https://www.eaipatterns.com/ramblings/18_starbucks.html) result 200).
* [ ] http://www.gnu.org/licenses/gpl.html with 1 occurrences migrated to:
  https://www.gnu.org/licenses/gpl.html ([https](https://www.gnu.org/licenses/gpl.html) result 200).
* [ ] http://fusesource.com (302) with 1 occurrences migrated to:
  https://www.jboss.org/ ([https](https://fusesource.com) result 200).
* [ ] http://www.microsoft.com/en-us/download/details.aspx?id=23650 with 2 occurrences migrated to:
  https://www.microsoft.com/en-us/download/details.aspx?id=23650 ([https](https://www.microsoft.com/en-us/download/details.aspx?id=23650) result 200).
* [ ] http://www.postgresql.org/ with 1 occurrences migrated to:
  https://www.postgresql.org/ ([https](https://www.postgresql.org/) result 200).
* [ ] http://www.rabbitmq.com/ with 6 occurrences migrated to:
  https://www.rabbitmq.com/ ([https](https://www.rabbitmq.com/) result 200).
* [ ] http://www.w3schools.com/xml/ with 1 occurrences migrated to:
  https://www.w3schools.com/xml/ ([https](https://www.w3schools.com/xml/) result 200).
* [ ] http://forum.springsource.org/archive/index.php/t-84006.html (301) with 1 occurrences migrated to:
  https://forum.spring.io/archive/index.php/t-84006.html ([https](https://forum.springsource.org/archive/index.php/t-84006.html) result 301).
* [ ] http://forum.spring.io/forum/spring-projects/integration/117523-starting-multiple-consumers?p=589517 with 1 occurrences migrated to:
  https://forum.spring.io/forum/spring-projects/integration/117523-starting-multiple-consumers?p=589517 ([https](https://forum.spring.io/forum/spring-projects/integration/117523-starting-multiple-consumers?p=589517) result 301).
* [ ] http://forum.spring.io/forum/spring-projects/integration/119081-dynamic-inbound-channel-adapter-creation with 1 occurrences migrated to:
  https://forum.spring.io/forum/spring-projects/integration/119081-dynamic-inbound-channel-adapter-creation ([https](https://forum.spring.io/forum/spring-projects/integration/119081-dynamic-inbound-channel-adapter-creation) result 301).
* [ ] http://jira.springframework.org/browse/ROO-909 with 1 occurrences migrated to:
  https://jira.springframework.org/browse/ROO-909 ([https](https://jira.springframework.org/browse/ROO-909) result 301).
* [ ] http://jquery.org/license with 1 occurrences migrated to:
  https://jquery.org/license ([https](https://jquery.org/license) result 301).
* [ ] http://junit.org/ with 1 occurrences migrated to:
  https://junit.org/ ([https](https://junit.org/) result 301).
* [ ] http://mina.apache.org/sshd-project with 1 occurrences migrated to:
  https://mina.apache.org/sshd-project ([https](https://mina.apache.org/sshd-project) result 301).
* [ ] http://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx with 1 occurrences migrated to:
  https://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx ([https](https://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx) result 301).
* [ ] http://projects.spring.io/spring-boot with 1 occurrences migrated to:
  https://projects.spring.io/spring-boot ([https](https://projects.spring.io/spring-boot) result 301).
* [ ] http://springsource.com with 1 occurrences migrated to:
  https://springsource.com ([https](https://springsource.com) result 301).
* [ ] http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 with 2 occurrences migrated to:
  https://support.microsoft.com/default.aspx?scid=kb;EN-US;914277 ([https](https://support.microsoft.com/default.aspx?scid=kb;EN-US;914277) result 301).
* [ ] http://www.360innovate.co.uk/blog/2009/03/periodicalupdater-for-jquery/ with 1 occurrences migrated to:
  https://www.360innovate.co.uk/blog/2009/03/periodicalupdater-for-jquery/ ([https](https://www.360innovate.co.uk/blog/2009/03/periodicalupdater-for-jquery/) result 301).
* [ ] http://www.eaipatterns.com/eaipatterns.html (302) with 1 occurrences migrated to:
  https://www.enterpriseintegrationpatterns.com/eaipatterns.html ([https](https://www.eaipatterns.com/eaipatterns.html) result 301).
* [ ] http://www.google.com/talk/ with 1 occurrences migrated to:
  https://www.google.com/talk/ ([https](https://www.google.com/talk/) result 301).
* [ ] http://www.gradle.org with 4 occurrences migrated to:
  https://www.gradle.org ([https](https://www.gradle.org) result 301).
* [ ] http://www.gradle.org/docs/current/userguide/application_plugin.html with 10 occurrences migrated to:
  https://www.gradle.org/docs/current/userguide/application_plugin.html ([https](https://www.gradle.org/docs/current/userguide/application_plugin.html) result 301).
* [ ] http://www.gradle.org/docs/current/userguide/jetty_plugin.html with 1 occurrences migrated to:
  https://www.gradle.org/docs/current/userguide/jetty_plugin.html ([https](https://www.gradle.org/docs/current/userguide/jetty_plugin.html) result 301).
* [ ] http://www.mapquestapi.com/ with 1 occurrences migrated to:
  https://www.mapquestapi.com/ ([https](https://www.mapquestapi.com/) result 301).
* [ ] http://www.mongodb.org/display/DOCS/Querying with 1 occurrences migrated to:
  https://www.mongodb.org/display/DOCS/Querying ([https](https://www.mongodb.org/display/DOCS/Querying) result 301).
* [ ] http://www.opensource.org/licenses/mit-license.php with 1 occurrences migrated to:
  https://www.opensource.org/licenses/mit-license.php ([https](https://www.opensource.org/licenses/mit-license.php) result 301).
* [ ] http://www.oracle.com/technetwork/indexes/downloads/index.html with 2 occurrences migrated to:
  https://www.oracle.com/technetwork/indexes/downloads/index.html ([https](https://www.oracle.com/technetwork/indexes/downloads/index.html) result 301).
* [ ] http://www.rabbitmq.com/install.html with 4 occurrences migrated to:
  https://www.rabbitmq.com/install.html ([https](https://www.rabbitmq.com/install.html) result 301).
* [ ] http://www.springsource.org/node/3598 with 1 occurrences migrated to:
  https://www.springsource.org/node/3598 ([https](https://www.springsource.org/node/3598) result 301).
* [ ] http://www.springsource.org/spring-amqp with 4 occurrences migrated to:
  https://www.springsource.org/spring-amqp ([https](https://www.springsource.org/spring-amqp) result 301).
* [ ] http://www.springsource.org/spring-integration with 35 occurrences migrated to:
  https://www.springsource.org/spring-integration ([https](https://www.springsource.org/spring-integration) result 301).
* [ ] http://www.springintegration.org/ (301) with 7 occurrences migrated to:
  https://www.springsource.org/spring-integration/ ([https](https://www.springintegration.org/) result 301).
* [ ] http://www.springsource.org/spring-security with 1 occurrences migrated to:
  https://www.springsource.org/spring-security ([https](https://www.springsource.org/spring-security) result 301).
* [ ] http://www.springsource.org/spring-web-services with 1 occurrences migrated to:
  https://www.springsource.org/spring-web-services ([https](https://www.springsource.org/spring-web-services) result 301).
* [ ] http://www.springsource.org/sts with 1 occurrences migrated to:
  https://www.springsource.org/sts ([https](https://www.springsource.org/sts) result 301).
* [ ] http://www.youtube.com/SpringSourceDev with 2 occurrences migrated to:
  https://www.youtube.com/SpringSourceDev ([https](https://www.youtube.com/SpringSourceDev) result 301).
* [ ] http://dev.twitter.com with 1 occurrences migrated to:
  https://dev.twitter.com ([https](https://dev.twitter.com) result 302).
* [ ] http://dev.twitter.com/ with 4 occurrences migrated to:
  https://dev.twitter.com/ ([https](https://dev.twitter.com/) result 302).
* [ ] http://visualvm.java.net/ with 1 occurrences migrated to:
  https://visualvm.java.net/ ([https](https://visualvm.java.net/) result 302).
* [ ] http://www.springsource.com/developer/sts with 4 occurrences migrated to:
  https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302).

# Ignored
These URLs were intentionally ignored.

* http://java.sun.com/JSP/Page with 40 occurrences
* http://java.sun.com/jsp/jstl/core with 34 occurrences
* http://java.sun.com/jsp/jstl/fmt with 2 occurrences
* http://java.sun.com/jsp/jstl/functions with 29 occurrences
* http://localhost:8080/broadcast/foo with 2 occurrences
* http://localhost:8080/chat with 1 occurrences
* http://localhost:8080/foo with 3 occurrences
* http://localhost:8080/monitoring with 1 occurrences
* http://localhost:8080/multipart-http/inboundAdapter.htm with 1 occurrences
* http://localhost:8080/rest-http/services/employee/ with 3 occurrences
* http://localhost:8080/rest-http/services/employee/0/search with 1 occurrences
* http://localhost:8080/rest-http/services/employee/1/search with 1 occurrences
* http://localhost:8080/shutdown with 1 occurrences
* http://localhost:8080/sockjs.js with 2 occurrences
* http://localhost:8080/stomp.js with 1 occurrences
* http://localhost:8080/time with 1 occurrences
* http://localhost:8080/ws-inbound-gateway/echoservice with 2 occurrences
* http://localhost:8082 with 1 occurrences
* http://schemas.xmlsoap.org/soap/envelope/ with 1 occurrences
* http://tiles.apache.org/tags-tiles with 1 occurrences
* http://www.example.org/orders with 3 occurrences
* http://www.example.org/orders-bigbooks with 2 occurrences
* http://www.springframework.org/spring-ws/samples/echo with 5 occurrences
* http://www.springframework.org/tags with 34 occurrences
* http://www.springframework.org/tags/form with 18 occurrences
* http://www.w3.org/1999/XSL/Transform with 1 occurrences
2019-03-22 15:59:21 -04:00
..
2019-03-22 14:52:00 -04:00
2019-03-20 15:40:27 -04:00
2019-03-22 15:59:21 -04:00

Spring Integration - MongoDb Sample

MongoDb Outbound Channel Adapter

The MongoDb Outbound Channel Adapter allows you to write the Message payload to a MongoDb document store. You can see the simplest configuration of the MongoDb Channel Adapter below:

<int-mongodb:outbound-channel-adapter id="deafultAdapter"/>

It will be initialized with the default instance of the MongoDbFactory (the default bean name is 'mongoDbFactory') otherwise you can provide its reference via mongodb-factory attribute.

Now you can run the MongoDbOutboundAdapterDemo. After running it open terminal window and start MongoDb CLI

$ mongo

Once in MongoDb CLI type a query:

> db.data.find({})

And you should see the 3 document entries we just created:

{ "_id" : ObjectId("505ff83d03649ed6881d066b"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "John", "lname" : "Doe", "address" : { "street" : "3401 Hillview Ave", "city" : "Palo Alto", "zip" : "94304", "state" : "CA" } }
{ "_id" : ObjectId("505ff83d03649ed6881d066c"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "Josh", "lname" : "Doe", "address" : { "street" : "123 Main st", "city" : "San Francisco", "zip" : "94115", "state" : "CA" } }
{ "_id" : ObjectId("505ff83d03649ed6881d066d"), "_class" : "org.springframework.integration.samples.mongodb.domain.Person", "fname" : "Jane", "lname" : "Doe", "address" : { "street" : "2323 Market st", "city" : "Philadelphia", "zip" : "19152", "state" : "PA" } }

Note that our entries were represented by a very simple Java Beans style objects which were converted into JSON string using default converters. Let's try to complicate the issue slightly. We are going to try to store a simple coma delimited String in our MongoDbOutboundAdapterDemo().runSimpleComplexAdapter() demo:

messageChannel.send(new GenericMessage<String>("John Dow, Palo Alto, 3401 Hillview Ave, 94304, CA"));

As you can see we are sending a Message with the String payload which represents a person. Executing this code will result in:

Caused by: java.lang.IllegalArgumentException: can't serialize class java.lang.Character

That is because MongoDb attempts to convert the underlying string using default set of converters that are based on Java Beans convention. In any case that is not what we are looking for in this case anyway since we want to store this object as a document with each field represented individually so we need to parse this string into a set of fields first. To do so we will apply a custom MongoConverter. Modify the sample configuration of simpleAdapterWithConverter to add a reference to an already configured converter.

<int-mongodb:outbound-channel-adapter id="adapterWithConverter"
			mongo-converter="stringConverter"/>

Run the demo again and you'll see that it will succeed this time and you should see the stored object as:

{ "_id" : ObjectId("505ffeac0364f8a92337657e"), "fname" : "John", "lname" : "Dow", "address" : { "city" : "Palo Alto", "street" : "3401 Hillview Ave", "zip" : "94304", "state" : "CA" } }

This time the conversion is done using a provided converter and you can see in the StringConverter.write(..) method that all that we are doing is parsing the input String and adding its data as an individual fields to an instance of the DBObject.

For even more complex scenarios you can also bootstrap the adapter with the custom instance of the MongoTemplate, but its out of scope of this blog.

MongoDb Inbound Channel Adapter<

MongoDb Inbound Channel Adapter allows you to read documents from the MongoDb and send them as Message payloads downstream. This simple example shows you how to read the documents stored in the MongoDb. For this example we'll use data stored by the MongoDb Outbound Channel Adapter discussed in the previous section. As you can see from the example below, the configuration of MongoDb Inbound Channel Adapter is very similar to any other polling Inbound Channel Adapter.

<int-mongodb:inbound-channel-adapter id="simpleInboundAdapter" channel="splittingChannel" 
								     query="{address.state : 'CA'}">
	<int:poller fixed-rate="60000" max-messages-per-poll="1"/>
</int-mongodb:inbound-channel-adapter>

Notice the query attribute which allows you to provide JSON queries represented as simple String. For more information on MongoDb queries please refer to MongoDb documentation In the above case we are selecting all documents where state element of the address element is 'CA'. As you may have guessed the MongoDb Inbound Channel Adapter returns List by default, so you can easily configure a very basic splitter downstream (as in this example) to process one message at the time. Run the MongoDbInboundAdapterDemo and you should see the results in the console:

04:37:30.720 WARN  . . . { "_id" : { "$oid" : "50601bca0364063859066bcd"} , "_class" : "org.springframework.integration.samples.mongodb.domain.Person" , "fname" : "John" , "lname" : "Doe" , "address" : { "street" : "3401 Hillview Ave" , "city" : "Palo Alto" , "zip" : "94304" , "state" : "CA"}}
04:37:30.722 WARN  . . . { "_id" : { "$oid" : "50601bca0364063859066bce"} , "_class" : "org.springframework.integration.samples.mongodb.domain.Person" , "fname" : "Josh" , "lname" : "Doe" , "address" : { "street" : "123 Main st" , "city" : "San Francisco" , "zip" : "94115" , "state" : "CA"}}

However, if you know that your query can only return a single result you can avoid returning List by configuring expect-single-result attribute setting its value to true.

Also, you may wish to do some post-processing to the successfully processed data that was read from the MongoDb. For example; you may want to move or remove a document after its been processed. You can do this using Transaction Synchronization feature that was added with Spring Integration 2.2 and which will be discussed in the next blog in this series expected in a few days (from Gary Russell). However the impatient once can get more details now by reading MongoDb Inbound Channel Adapter section of the reference manual https://docs.spring.io/spring-integration/reference/html/#mongodb-inbound-channel-adapter.