├── basic ├── file │ ├── input │ │ ├── file_0.txt │ │ ├── file_1.txt │ │ ├── file_2.txt │ │ ├── file_3.txt │ │ └── file_4.txt │ ├── README.md │ └── src │ │ └── test │ │ └── resources │ │ └── log4j2.xml ├── ftp │ ├── src │ │ └── test │ │ │ ├── resources │ │ │ ├── test-files │ │ │ │ ├── a.txt │ │ │ │ └── b.txt │ │ │ ├── user.properties │ │ │ └── log4j2.xml │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── ftp │ │ │ └── ToFtpFlowGateway.java │ └── .gitignore ├── jms │ ├── .gitignore │ └── src │ │ └── main │ │ ├── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ │ └── spring │ │ │ └── integration │ │ │ └── outboundChannelAdapter.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── jms │ │ └── DemoBean.java ├── tcp-with-headers │ ├── src │ │ └── main │ │ │ └── resources │ │ │ ├── application.properties │ │ │ └── logback.xml │ └── .gitignore ├── mqtt │ ├── src │ │ └── main │ │ │ └── resources │ │ │ ├── application.properties │ │ │ └── logback.xml │ └── README.md ├── sftp │ ├── .gitignore │ └── src │ │ └── test │ │ ├── resources │ │ ├── user.properties │ │ ├── META-INF │ │ │ └── keys │ │ │ │ └── sftp_known_hosts │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── sftp │ │ └── ToSftpFlowGateway.java ├── http │ └── src │ │ └── main │ │ ├── webapp │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ └── WEB-INF │ │ │ └── web.xml │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── http │ │ │ ├── spring09_logo.png │ │ │ └── RequestGateway.java │ │ └── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ └── spring │ │ └── integration │ │ └── http-outbound-config.xml ├── tcp-broadcast │ ├── src │ │ └── main │ │ │ └── resources │ │ │ └── application.properties │ └── README.adoc ├── jpa │ ├── src │ │ └── main │ │ │ └── resources │ │ │ ├── data.sql │ │ │ ├── application.yml │ │ │ ├── schema.sql │ │ │ └── logback.xml │ └── README.md ├── splunk │ └── src │ │ └── main │ │ └── resources │ │ ├── application.yml │ │ └── logback.xml ├── ws-inbound-gateway │ └── src │ │ ├── main │ │ ├── webapp │ │ │ ├── index.html │ │ │ └── WEB-INF │ │ │ │ ├── spring-ws-config.xml │ │ │ │ └── web.xml │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── integration │ │ │ └── inbound-gateway-config.xml │ │ └── test │ │ └── resources │ │ └── log4j2.xml ├── twitter │ └── src │ │ └── test │ │ ├── resources │ │ ├── oauth.properties │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── twitter │ │ ├── TwitterSearchSample.java │ │ └── TwitterTimelineUpdatesSample.java ├── barrier │ └── src │ │ └── main │ │ ├── resources │ │ ├── application.properties │ │ └── logback.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ ├── barrier │ │ └── RequestGateway.java │ │ └── barrier2 │ │ └── Gateway.java ├── xmpp │ ├── src │ │ └── test │ │ │ ├── resources │ │ │ ├── xmpp.properties │ │ │ └── log4j2.xml │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── xmpp │ │ │ └── ReceiveInstantMessageSample.java │ └── README.md ├── feed │ ├── README.md │ └── src │ │ └── test │ │ └── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ └── spring │ │ └── integration │ │ └── FeedInboundChannelAdapterSample-context.xml ├── xml │ └── src │ │ └── main │ │ └── resources │ │ ├── META-INF │ │ └── spring │ │ │ └── integration │ │ │ ├── order.xml │ │ │ └── bigBooksSupplierTransformer.xsl │ │ └── log4j2.xml ├── kafka │ └── src │ │ └── main │ │ └── resources │ │ ├── logback.xml │ │ └── application.yml ├── helloworld-kotlin │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── log4j2.xml │ │ └── kotlin │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── helloworld │ │ │ └── HelloService.kt │ │ └── test │ │ └── kotlin │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── helloworld │ │ └── HelloServiceTests.kt ├── jdbc │ └── src │ │ └── main │ │ ├── resources │ │ ├── setup-tables.sql │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── jdbc │ │ └── domain │ │ └── UserMapper.java ├── jmx │ └── src │ │ └── test │ │ └── resources │ │ └── log4j2.xml ├── mail │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── quote │ ├── src │ │ ├── test │ │ │ └── resources │ │ │ │ └── log4j2.xml │ │ └── main │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── quote │ │ │ ├── TickerStream.java │ │ │ └── Quote.java │ └── README.md ├── control-bus │ ├── src │ │ ├── test │ │ │ └── resources │ │ │ │ └── log4j2.xml │ │ └── main │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── integration │ │ │ └── ControlBusDemo-context.xml │ └── README.md ├── enricher │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── helloworld │ └── src │ │ └── main │ │ ├── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ │ └── spring │ │ │ └── integration │ │ │ ├── helloWorldDemo.xml │ │ │ └── delay.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── helloworld │ │ └── HelloService.java ├── mongodb │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── oddeven │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── tcp-amqp │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── testing-examples │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── log4j2.xml │ │ │ └── META-INF │ │ │ │ └── spring │ │ │ │ └── integration │ │ │ │ ├── 02-splitter │ │ │ │ └── integration-context.xml │ │ │ │ ├── 05-router │ │ │ │ └── integration-context.xml │ │ │ │ ├── 08-errorhandling │ │ │ │ └── integration-context.xml │ │ │ │ ├── 07-gateway │ │ │ │ └── integration-context.xml │ │ │ │ ├── 01-chain │ │ │ │ └── integration-context.xml │ │ │ │ └── 06-filter │ │ │ │ └── integration-context.xml │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── testing │ │ │ ├── externalgateway │ │ │ └── WeatherAndTraffic.java │ │ │ ├── filter │ │ │ └── PetFilter.java │ │ │ └── gateway │ │ │ └── VoidGateway.java │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── testing │ │ ├── chain │ │ └── SpelChainTests-context.xml │ │ ├── gateway │ │ └── GatewayTests-context.xml │ │ ├── splitter │ │ └── CommaDelimitedSplitterTests-context.xml │ │ ├── aggregator │ │ └── CommaDelimitedAggregatorTests-context.xml │ │ ├── errorhandling │ │ └── GatewayTests-context.xml │ │ ├── filter │ │ └── PetFilterTests-context.xml │ │ ├── router │ │ └── PetRouterTests-context.xml │ │ └── externalgateway │ │ └── ExternalGatewaySubstitutionTests-context.xml ├── helloworld-groovy │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── log4j2.xml │ │ └── groovy │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── helloworld │ │ │ └── HelloService.groovy │ │ └── test │ │ └── groovy │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── helloworld │ │ └── HelloServiceTests.groovy ├── tcp-client-server │ └── src │ │ └── main │ │ ├── resources │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── tcpclientserver │ │ ├── SimpleGateway.java │ │ └── EchoService.java ├── web-sockets │ └── src │ │ └── main │ │ └── resources │ │ ├── logback.xml │ │ └── static │ │ └── index.html ├── zip │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── amqp │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── README.md └── ws-outbound-gateway │ └── src │ └── main │ └── resources │ └── log4j2.xml ├── intermediate ├── async-gateway │ ├── .gitignore │ └── src │ │ ├── test │ │ └── resources │ │ │ └── log4j2.xml │ │ └── main │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── async │ │ └── gateway │ │ ├── MathServiceGateway.java │ │ └── MathService.java ├── file-processing │ ├── .gitignore │ └── src │ │ └── test │ │ └── resources │ │ └── log4j2.xml ├── monitoring │ ├── .gitignore │ └── src │ │ └── main │ │ ├── webapp │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ ├── css │ │ │ └── main.css │ │ └── WEB-INF │ │ │ └── views │ │ │ ├── includes │ │ │ └── taglibs.jsp │ │ │ └── twitterMessages.jsp │ │ └── resources │ │ ├── oauth.properties │ │ └── log4j2.xml ├── testcontainers-rabbitmq │ └── src │ │ ├── main │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── resources │ │ └── application.yml ├── rest-http │ └── src │ │ └── main │ │ ├── webapp │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ └── WEB-INF │ │ │ └── config │ │ │ └── web-application-config.xml │ │ └── resources │ │ ├── users.properties │ │ ├── org │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── rest │ │ │ └── domain │ │ │ └── jaxb.index │ │ └── log4j2.xml ├── multipart-http │ └── src │ │ └── main │ │ ├── webapp │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ ├── index.html │ │ └── WEB-INF │ │ │ └── web.xml │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── multipart │ │ │ ├── spring09_logo.png │ │ │ └── MultipartRequestGateway.java │ │ └── resources │ │ └── log4j2.xml ├── tx-synch │ └── src │ │ └── main │ │ └── resources │ │ ├── table.sql │ │ └── log4j2.xml ├── tcp-async-bi-directional │ ├── src │ │ └── main │ │ │ └── resources │ │ │ └── application.yml │ ├── README.md │ └── .gitignore ├── mail-attachments │ └── src │ │ ├── test │ │ └── resources │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── mailattachments │ │ │ └── picture.png │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── errorhandling │ ├── README.md │ └── src │ │ ├── test │ │ └── resources │ │ │ └── log4j2.xml │ │ └── main │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── errorhandling │ │ └── Invitation.java ├── travel │ └── src │ │ └── main │ │ ├── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ │ └── spring │ │ │ └── integration-ws-context.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── travel │ │ ├── WeatherRequestTransformer.java │ │ └── TravelGateway.java ├── dynamic-poller │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── stored-procedures-derby │ ├── src │ │ └── main │ │ │ └── resources │ │ │ └── log4j2.xml │ └── README.md ├── stored-procedures-ms │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── stored-procedures-oracle │ └── src │ │ └── main │ │ ├── resources │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── service │ │ └── StringConversionService.java ├── tcp-client-server-multiplex │ └── src │ │ └── main │ │ ├── resources │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── tcpclientserver │ │ └── SimpleGateway.java ├── retry-and-more │ └── src │ │ └── main │ │ └── resources │ │ └── log4j2.xml ├── splitter-aggregator-reaper │ └── src │ │ └── main │ │ ├── resources │ │ └── log4j2.xml │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── splitteraggregator │ │ ├── Result.java │ │ ├── support │ │ ├── CriteriaA.java │ │ ├── CriteriaB.java │ │ └── AbstractCriteria.java │ │ ├── SearchRequestor.java │ │ ├── CompositeResult.java │ │ └── SearchResultAggregator.java ├── README.md └── stored-procedures-postgresql │ └── src │ └── main │ └── resources │ └── log4j.xml ├── .github ├── dco.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.md │ └── bug_report.md ├── workflows │ ├── pr-build.yml │ └── ci-snapshot.yml └── PULL_REQUEST_TEMPLATE.md ├── advanced ├── dynamic-tcp-client │ ├── src │ │ ├── main │ │ │ └── resources │ │ │ │ ├── application.properties │ │ │ │ └── logback.xml │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── dynamictcp │ │ │ └── DynamicTcpClientApplicationTests.java │ ├── .gitignore │ └── README.adoc ├── dynamic-ftp │ └── src │ │ └── test │ │ └── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ └── spring │ │ └── integration │ │ └── DynamicFtpOutboundChannelAdapterSample-context.xml ├── advanced-testing-examples │ ├── src │ │ └── test │ │ │ └── resources │ │ │ └── log4j2.xml │ └── README.md └── README.md ├── applications ├── cafe-scripted │ ├── .gitignore │ ├── scripts │ │ ├── ruby │ │ │ └── barista.rb │ │ ├── python │ │ │ └── barista.py │ │ ├── groovy │ │ │ └── barista.groovy │ │ └── javascript │ │ │ └── barista.js │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ └── log4j2.xml │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── cafe │ │ │ ├── DrinkType.java │ │ │ ├── WaiterMonitor.java │ │ │ └── Customer.java │ └── README.md ├── loanshark │ ├── src │ │ └── main │ │ │ ├── webapp │ │ │ ├── WEB-INF │ │ │ │ ├── classes │ │ │ │ │ ├── alt.properties │ │ │ │ │ └── standard.properties │ │ │ │ ├── views │ │ │ │ │ ├── index-template.jspx │ │ │ │ │ ├── header.jspx │ │ │ │ │ ├── index.jspx │ │ │ │ │ ├── loansharks │ │ │ │ │ │ ├── findLoanSharksByName.jspx │ │ │ │ │ │ ├── show.jspx │ │ │ │ │ │ ├── update.jspx │ │ │ │ │ │ ├── views.xml │ │ │ │ │ │ └── list.jspx │ │ │ │ │ ├── menu.jspx │ │ │ │ │ └── views.xml │ │ │ │ ├── tags │ │ │ │ │ ├── util │ │ │ │ │ │ └── placeholder.tagx │ │ │ │ │ └── menu │ │ │ │ │ │ └── menu.tagx │ │ │ │ ├── layouts │ │ │ │ │ ├── layouts.xml │ │ │ │ │ └── default.jspx │ │ │ │ └── i18n │ │ │ │ │ └── application.properties │ │ │ └── images │ │ │ │ ├── en.png │ │ │ │ ├── add.png │ │ │ │ ├── list.png │ │ │ │ ├── show.png │ │ │ │ ├── create.png │ │ │ │ ├── delete.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── update.png │ │ │ │ ├── banner-graphic.png │ │ │ │ ├── resultset_first.png │ │ │ │ ├── resultset_last.png │ │ │ │ ├── resultset_next.png │ │ │ │ ├── springsource-logo.png │ │ │ │ └── resultset_previous.png │ │ │ ├── resources │ │ │ ├── META-INF │ │ │ │ ├── spring │ │ │ │ │ └── database.properties │ │ │ │ └── persistence.xml │ │ │ └── log4j2.xml │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── loanbroker │ │ │ └── loanshark │ │ │ └── biz │ │ │ └── SharkTransformer.java │ ├── udps.groovy │ ├── udps.pl │ ├── README.md │ └── script.roo ├── file-split-ftp │ ├── .gitignore │ ├── images │ │ ├── flo1.png │ │ └── flo2.png │ ├── src │ │ └── main │ │ │ └── resources │ │ │ ├── application.properties │ │ │ └── logback.xml │ └── README.adoc ├── stomp-chat │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── application.properties │ │ │ └── logback.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── chat │ │ └── stomp │ │ └── server │ │ └── ApplicationTests.java ├── loan-broker │ ├── udps.groovy │ ├── udps.pl │ └── src │ │ └── main │ │ └── resources │ │ ├── META-INF │ │ └── spring │ │ │ └── integration │ │ │ └── bootstrap-config │ │ │ ├── stubbed-loan-broker.xml │ │ │ └── stubbed-loan-broker-multicast.xml │ │ └── log4j2.xml ├── cafe │ ├── cafe-si │ │ └── src │ │ │ └── main │ │ │ ├── resources │ │ │ └── log4j2.xml │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── cafe │ │ │ ├── DrinkType.java │ │ │ └── xml │ │ │ └── Waiter.java │ ├── cafe-amqp │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── log4j2.xml │ └── cafe-jms │ │ └── src │ │ └── main │ │ └── resources │ │ ├── log4j2.xml │ │ └── META-INF │ │ └── spring │ │ └── integration │ │ └── activemq │ │ └── cafeDemo-amq-config.xml └── README.md ├── dsl ├── cafe-dsl │ ├── src │ │ ├── main │ │ │ └── resources │ │ │ │ ├── application.properties │ │ │ │ └── logback.xml │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── springframework │ │ │ └── integration │ │ │ └── samples │ │ │ └── dsl │ │ │ └── cafe │ │ │ └── ApplicationTests.java │ └── README.md ├── si4demo │ └── src │ │ ├── main │ │ └── resources │ │ │ ├── application.yml │ │ │ ├── logback.xml │ │ │ ├── BXMLAndPojo-context.xml │ │ │ └── AXML-context.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── integration │ │ └── samples │ │ └── si4demo │ │ └── ApplicationTests.java └── kafka-dsl │ └── src │ └── main │ └── resources │ ├── logback.xml │ └── application.yml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── .gitignore ├── src └── checkstyle │ └── checkstyle-header.txt └── settings.gradle /basic/file/input/file_0.txt: -------------------------------------------------------------------------------- 1 | hello 0 -------------------------------------------------------------------------------- /basic/file/input/file_1.txt: -------------------------------------------------------------------------------- 1 | hello 1 -------------------------------------------------------------------------------- /basic/file/input/file_2.txt: -------------------------------------------------------------------------------- 1 | hello 2 -------------------------------------------------------------------------------- /basic/file/input/file_3.txt: -------------------------------------------------------------------------------- 1 | hello 3 -------------------------------------------------------------------------------- /basic/file/input/file_4.txt: -------------------------------------------------------------------------------- 1 | hello 4 -------------------------------------------------------------------------------- /basic/ftp/src/test/resources/test-files/a.txt: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /basic/ftp/src/test/resources/test-files/b.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /intermediate/async-gateway/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /.github/dco.yml: -------------------------------------------------------------------------------- 1 | require: 2 | members: false 3 | -------------------------------------------------------------------------------- /basic/jms/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /activemq-data 3 | -------------------------------------------------------------------------------- /basic/ftp/.gitignore: -------------------------------------------------------------------------------- 1 | /local-target-dir 2 | /target 3 | -------------------------------------------------------------------------------- /intermediate/file-processing/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /input 3 | -------------------------------------------------------------------------------- /basic/tcp-with-headers/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /advanced/dynamic-tcp-client/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /intermediate/monitoring/.gitignore: -------------------------------------------------------------------------------- 1 | src/main/resources/oauth.properties.* 2 | -------------------------------------------------------------------------------- /intermediate/testcontainers-rabbitmq/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /basic/mqtt/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | mqtt.url=tcp://localhost:1883 -------------------------------------------------------------------------------- /basic/sftp/.gitignore: -------------------------------------------------------------------------------- 1 | /local-dir 2 | /target 3 | hostkey.ser 4 | si.sftp.sample 5 | -------------------------------------------------------------------------------- /basic/http/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /applications/cafe-scripted/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .classpath 3 | .project 4 | .springBeans 5 | .settings 6 | -------------------------------------------------------------------------------- /intermediate/monitoring/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /intermediate/rest-http/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/classes/alt.properties: -------------------------------------------------------------------------------- 1 | styleSheet=resources/styles/alt.css 2 | -------------------------------------------------------------------------------- /intermediate/rest-http/src/main/resources/users.properties: -------------------------------------------------------------------------------- 1 | SPRING={noop}spring,ROLE_REST_HTTP_USER,enabled 2 | -------------------------------------------------------------------------------- /basic/tcp-broadcast/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #logging.level.org.springframework.integration=debug 2 | -------------------------------------------------------------------------------- /intermediate/multipart-http/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/classes/standard.properties: -------------------------------------------------------------------------------- 1 | styleSheet=resources/styles/standard.css 2 | -------------------------------------------------------------------------------- /basic/ftp/src/test/resources/user.properties: -------------------------------------------------------------------------------- 1 | userid=demo 2 | password=demo 3 | availableServerPort=3333 4 | host=localhost -------------------------------------------------------------------------------- /intermediate/tx-synch/src/main/resources/table.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE IF NOT EXISTS FOO ( 3 | BAR VARCHAR(256) 4 | ); -------------------------------------------------------------------------------- /basic/jpa/src/main/resources/data.sql: -------------------------------------------------------------------------------- 1 | insert into PEOPLE(id, name, CREATED_DATE_TIME) values ('1001', 'Cartman', NOW()); 2 | -------------------------------------------------------------------------------- /applications/file-split-ftp/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | .classpath 3 | .project 4 | .settings 5 | .factorypath 6 | .mvn 7 | mvnw* 8 | -------------------------------------------------------------------------------- /intermediate/rest-http/src/main/resources/org/springframework/integration/samples/rest/domain/jaxb.index: -------------------------------------------------------------------------------- 1 | Employee 2 | EmployeeList -------------------------------------------------------------------------------- /dsl/cafe-dsl/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.task.scheduling.pool.size=10 2 | spring.integration.endpoint.default-timeout=-1 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /applications/file-split-ftp/images/flo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/file-split-ftp/images/flo1.png -------------------------------------------------------------------------------- /applications/file-split-ftp/images/flo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/file-split-ftp/images/flo2.png -------------------------------------------------------------------------------- /basic/splunk/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | splunk: 2 | host: localhost 3 | port: 8089 4 | username: admin 5 | password: admin 6 | owner: admin 7 | -------------------------------------------------------------------------------- /basic/ws-inbound-gateway/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | The web service has been successfully deployed. You may now issue SOAP requests. See included JUnit tests for examples. -------------------------------------------------------------------------------- /applications/stomp-chat/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | logging.level.org.springframework.web.socket.sockjs.transport.session=trace 2 | server.session.timeout=60 3 | -------------------------------------------------------------------------------- /basic/twitter/src/test/resources/oauth.properties: -------------------------------------------------------------------------------- 1 | twitter.oauth.consumerKey= 2 | twitter.oauth.consumerSecret= 3 | twitter.oauth.accessToken= 4 | twitter.oauth.accessTokenSecret= -------------------------------------------------------------------------------- /applications/file-split-ftp/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.mail.host=localhost 2 | spring.mail.port=25 3 | spring.mail.username=user 4 | spring.mail.password=pw 5 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/en.png -------------------------------------------------------------------------------- /intermediate/tcp-async-bi-directional/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | tcp: 2 | server-port: 1234 3 | #logging: 4 | # level: 5 | # org.springframework.integration: debug 6 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/add.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/list.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/show.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | version=7.0.0 2 | springBootVersion=4.0.0-SNAPSHOT 3 | org.gradle.jvmargs=-Xmx1536M -Dfile.encoding=UTF-8 4 | org.gradle.caching=true 5 | org.gradle.parallel=true 6 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/create.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/delete.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/favicon.ico -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/update.png -------------------------------------------------------------------------------- /intermediate/monitoring/src/main/resources/oauth.properties: -------------------------------------------------------------------------------- 1 | twitter.oauth.consumerKey= 2 | twitter.oauth.consumerSecret= 3 | twitter.oauth.accessToken= 4 | twitter.oauth.accessTokenSecret= 5 | -------------------------------------------------------------------------------- /basic/barrier/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.output.ansi.enabled=always 2 | 3 | spring.rabbitmq.publisher-confirm-type=correlated 4 | spring.rabbitmq.publisher-returns=true 5 | -------------------------------------------------------------------------------- /basic/jpa/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | jpa: 3 | generate-ddl: false 4 | hibernate: 5 | ddl-auto: none 6 | show-sql: true 7 | main: 8 | banner-mode: "off" 9 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/banner-graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/banner-graphic.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/resultset_first.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/resultset_first.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/resultset_last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/resultset_last.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/resultset_next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/resultset_next.png -------------------------------------------------------------------------------- /intermediate/multipart-http/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | You have successfully deployed HTTP Multipart Sample. 2 | 3 | Now you ready to execute org.springframework.integration.samples.multipart.MultipartClient -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/springsource-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/springsource-logo.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/images/resultset_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/applications/loanshark/src/main/webapp/images/resultset_previous.png -------------------------------------------------------------------------------- /dsl/si4demo/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | twitter: 2 | oauth: 3 | consumerKey: 4 | consumerSecret: 5 | accessToken: 6 | accessTokenSecret: 7 | 8 | gmail: 9 | user: 10 | password: 11 | -------------------------------------------------------------------------------- /basic/xmpp/src/test/resources/xmpp.properties: -------------------------------------------------------------------------------- 1 | user.login=user@gmail.com 2 | user.password=password 3 | user.host=talk.google.com 4 | user.service=gmail.com 5 | user.resource=resource 6 | user.port=5222 7 | 8 | send.to.user=another.user@gmail.com -------------------------------------------------------------------------------- /basic/http/src/main/java/org/springframework/integration/samples/http/spring09_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/basic/http/src/main/java/org/springframework/integration/samples/http/spring09_logo.png -------------------------------------------------------------------------------- /basic/jpa/src/main/resources/schema.sql: -------------------------------------------------------------------------------- 1 | drop table if EXISTS PEOPLE; 2 | 3 | CREATE TABLE PEOPLE (id BIGINT generated by default as identity, name VARCHAR(255), CREATED_DATE_TIME TIMESTAMP, PRIMARY KEY (id)); 4 | 5 | CREATE SEQUENCE PEOPLE_SEQ START WITH 1 INCREMENT BY 50; 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Community Support 4 | url: https://stackoverflow.com/questions/tagged/spring-integration 5 | about: Please ask and answer questions on StackOverflow with the tag spring-integration 6 | -------------------------------------------------------------------------------- /.github/workflows/pr-build.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Build 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build-pull-request: 10 | uses: spring-io/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@main 11 | -------------------------------------------------------------------------------- /intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/spring09_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/spring09_logo.png -------------------------------------------------------------------------------- /applications/loanshark/src/main/resources/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | #Updated at Tue Sep 07 17:11:44 EDT 2010 2 | #Tue Sep 07 17:11:44 EDT 2010 3 | database.password= 4 | database.url=jdbc\:hsqldb\:mem\:loanshark 5 | database.username=sa 6 | database.driverClassName=org.hsqldb.jdbcDriver 7 | -------------------------------------------------------------------------------- /intermediate/mail-attachments/src/test/resources/org/springframework/integration/samples/mailattachments/picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-projects/spring-integration-samples/HEAD/intermediate/mail-attachments/src/test/resources/org/springframework/integration/samples/mailattachments/picture.png -------------------------------------------------------------------------------- /basic/feed/README.md: -------------------------------------------------------------------------------- 1 | RSS Feed Sample 2 | =============== 3 | 4 | This example demonstrates the usage of the Spring Integration RSS Feed Module using a **Feed Inbound Channel Adapter**. In order to run the sample, execute the test case located in the **org.springframework.integration.samples.feed** package. 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | application.log 2 | application.log* 3 | target/ 4 | bin/ 5 | log.roo 6 | .project 7 | .classpath 8 | .springBeans 9 | .DS_Store 10 | *.iml 11 | *.ipr 12 | *.iws 13 | derby.log 14 | .idea 15 | activemq-data 16 | .settings/ 17 | .sts4-cache 18 | .factorypath 19 | out 20 | /.gradle 21 | build/ 22 | /classes 23 | .mvn 24 | mvnw* 25 | .vscode -------------------------------------------------------------------------------- /basic/tcp-with-headers/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .mvn 3 | mvn* 4 | 5 | ### STS ### 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ 25 | -------------------------------------------------------------------------------- /basic/xml/src/main/resources/META-INF/spring/integration/order.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0321200683 5 | 2 6 | 7 | 8 | 1590596439 9 | 1 10 | 11 | -------------------------------------------------------------------------------- /advanced/dynamic-tcp-client/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .mvn 3 | mvn* 4 | 5 | ### STS ### 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | 12 | ### IntelliJ IDEA ### 13 | .idea 14 | *.iws 15 | *.iml 16 | *.ipr 17 | 18 | ### NetBeans ### 19 | nbproject/private/ 20 | build/ 21 | nbbuild/ 22 | dist/ 23 | nbdist/ 24 | .nb-gradle/ 25 | -------------------------------------------------------------------------------- /intermediate/tcp-async-bi-directional/README.md: -------------------------------------------------------------------------------- 1 | TCP Async Bi-Directional Sample 2 | ================================== 3 | 4 | If this is your first experience with the spring-integration-ip module, start with the **tcp-client-server** project in the basic folder. 5 | 6 | This sample demonstrates asynchronous, arbitrary bi-directional communication between 2 peers. 7 | -------------------------------------------------------------------------------- /basic/sftp/src/test/resources/user.properties: -------------------------------------------------------------------------------- 1 | sftp.host=localhost 2 | # 0 means the embedded Apache MINA SshServer. Change it to any real port, if you are going to test sample against real SFTP Server 3 | sftp.port=0 4 | sftp.username=user 5 | sftp.passphrase=password 6 | #private.keyfile=file:/home/someuser/.ssh/id_rsa 7 | sftp.private.keyfile=classpath:META-INF/keys/sftp_rsa 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /intermediate/testcontainers-rabbitmq/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | logging.level: 2 | org.springframework.integration: DEBUG 3 | com.playtika.test: DEBUG 4 | 5 | spring: 6 | rabbitmq: 7 | host: ${embedded.rabbitmq.host} 8 | port: ${embedded.rabbitmq.port} 9 | username: ${embedded.rabbitmq.user} 10 | password: ${embedded.rabbitmq.password} 11 | virtual-host: ${embedded.rabbitmq.vhost} 12 | -------------------------------------------------------------------------------- /intermediate/monitoring/src/main/webapp/css/main.css: -------------------------------------------------------------------------------- 1 | .container { 2 | border: 1px solid #728C16; 3 | margin-top: 1.5em; 4 | } 5 | 6 | #header { 7 | background-color: #EEEEEE; 8 | } 9 | 10 | .twitterMessages { 11 | list-style: none; 12 | } 13 | 14 | .twitterMessages img { 15 | vertical-align: middle; 16 | } 17 | 18 | .twitterMessages li { 19 | padding-top: 2px; 20 | padding-bottom: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /basic/sftp/src/test/resources/META-INF/keys/sftp_known_hosts: -------------------------------------------------------------------------------- 1 | localhost ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMQB/vTCY6QEF+/P73ZQZzgj5LBUG8gKPbAXdWcE/X0g3jgsPpxb7+NGiqNpP+oVIQsL9Q7TBsv1/X7xc6sd6SmM/UTP8LF0zlf0GSvEehC2BT98GCiDqI8BKpZjG6O8+pPEBY8M5iGOLtDUSzlhzyV7kPcADYLHl/z1fssU+x2UML7BoSmgh0XPc2u+Gv6+58SVk2ipAZOmaWZDyzWAc3sczz/DkQeR/cpj047HVc1Zb/M5a4ajYI18Ka+mVhKeiQnHc3NKwE6ZxcwlacbVK/feypfperHQOlj6Ee6f6huhnVx9x42V11A41Toh98WI2EVDequ4EcTxHHJntJhpbd 2 | -------------------------------------------------------------------------------- /applications/cafe-scripted/scripts/ruby/barista.rb: -------------------------------------------------------------------------------- 1 | require 'java' 2 | 3 | java_import org.springframework.integration.samples.cafe.Drink 4 | 5 | orderItem = payload 6 | 7 | puts "ruby: preparing #{orderItem} for order #{orderItem.order.number}" 8 | 9 | sleep(timeToPrepare.to_f) 10 | 11 | Drink.new(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), 12 | orderItem.getShots()) 13 | 14 | 15 | -------------------------------------------------------------------------------- /applications/loanshark/udps.groovy: -------------------------------------------------------------------------------- 1 | //Groovy Script to catch multicast packets. 2 | socket = new MulticastSocket(11111) 3 | mcast = InetAddress.getByName("225.6.7.8") 4 | socket.joinGroup(mcast) 5 | buffer = (' ' * 1024) as byte[] 6 | while(true) { 7 | incoming = new DatagramPacket(buffer, buffer.length) 8 | socket.receive(incoming) 9 | s = new String(incoming.data, 0, incoming.length) 10 | println ("** Shark **" + s) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /applications/loan-broker/udps.groovy: -------------------------------------------------------------------------------- 1 | //Groovy Script to catch multicast packets. 2 | socket = new MulticastSocket(11111) 3 | mcast = InetAddress.getByName("225.6.7.8") 4 | socket.joinGroup(mcast) 5 | buffer = (' ' * 1024) as byte[] 6 | while(true) { 7 | incoming = new DatagramPacket(buffer, buffer.length) 8 | socket.receive(incoming) 9 | s = new String(incoming.data, 0, incoming.length) 10 | println ("** Shark **" + s) 11 | } 12 | 13 | -------------------------------------------------------------------------------- /applications/loan-broker/udps.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | #Perl Script to catch multicast packets. 3 | use strict; 4 | use IO::Socket::Multicast; 5 | 6 | my $socket = IO::Socket::Multicast->new(LocalPort=>11111, ReuseAddr=>1) 7 | or die "Can't start UDP server: $@"; 8 | 9 | $socket->mcast_add('225.6.7.8'); 10 | 11 | my ($datagram,$flags); 12 | while ($socket->recv($datagram,1024,$flags)) { 13 | print "**Shark** $datagram\n"; 14 | } 15 | 16 | $socket->close(); 17 | -------------------------------------------------------------------------------- /applications/loanshark/udps.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | #Perl Script to catch multicast packets. 3 | use strict; 4 | use IO::Socket::Multicast; 5 | 6 | my $socket = IO::Socket::Multicast->new(LocalPort=>11111, ReuseAddr=>1) 7 | or die "Can't start UDP server: $@"; 8 | 9 | $socket->mcast_add('225.6.7.8'); 10 | 11 | my ($datagram,$flags); 12 | while ($socket->recv($datagram,1024,$flags)) { 13 | print "**Shark** $datagram\n"; 14 | } 15 | 16 | $socket->close(); 17 | -------------------------------------------------------------------------------- /basic/kafka/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /basic/splunk/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /dsl/kafka-dsl/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /dsl/si4demo/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /intermediate/errorhandling/README.md: -------------------------------------------------------------------------------- 1 | Error Handling Sample 2 | ===================== 3 | 4 | Demonstrates the handling of Exceptions in an asynchronous messaging environment. View the **errorHandlingDemo.xml** configuration file. Notice the use of a **Header Enricher** within a **Chain**, that establishes an **error-channel** reference prior to passing the message to a **Service Activator**. 5 | 6 | In order to run the sample, execute **PartyDemoTest** in package **org.springframework.integration.samples.errorhandling**. -------------------------------------------------------------------------------- /applications/stomp-chat/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /intermediate/tcp-async-bi-directional/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /basic/helloworld-kotlin/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /applications/cafe-scripted/scripts/python/barista.py: -------------------------------------------------------------------------------- 1 | import time 2 | import java 3 | 4 | Drink = java.type("org.springframework.integration.samples.cafe.Drink") 5 | 6 | def prepareDrink(orderItem): 7 | print("python: preparing %s for order %s" % (orderItem,orderItem.getOrder().getNumber())) 8 | time.sleep(eval(timeToPrepare)) 9 | return Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), 10 | orderItem.getShots()) 11 | 12 | drink = prepareDrink(payload) 13 | -------------------------------------------------------------------------------- /applications/cafe-scripted/scripts/groovy/barista.groovy: -------------------------------------------------------------------------------- 1 | package groovy 2 | import org.springframework.integration.samples.cafe.Drink 3 | 4 | def prepareDrink(orderItem){ 5 | println "groovy: preparing $orderItem for order ${orderItem.order.number}" 6 | try { 7 | Thread.sleep(timeToPrepare as long) 8 | } catch (e) { 9 | println "sleep interrupted" 10 | } 11 | new Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), 12 | orderItem.getShots()) 13 | } 14 | 15 | prepareDrink(payload) 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basic/jdbc/src/main/resources/setup-tables.sql: -------------------------------------------------------------------------------- 1 | create table IF NOT EXISTS USERS(USERNAME varchar(100),PASSWORD varchar(100), EMAIL varchar(100)); 2 | create table IF NOT EXISTS Person(id int auto_increment primary key , name varchar(100), gender varchar(1), dateOfBirth date); 3 | INSERT INTO USERS(USERNAME, PASSWORD, EMAIL) VALUES ('a', 'secret', 'spring-integration@awesome.com'); 4 | INSERT INTO USERS(USERNAME, PASSWORD, EMAIL) VALUES ('b', 's3cr3t', 'spring@rocks.com'); 5 | INSERT INTO USERS(USERNAME, PASSWORD, EMAIL) VALUES ('foo', 'bar', 'foo@bar.de'); 6 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |

7 | 8 |

9 |
10 |
-------------------------------------------------------------------------------- /applications/cafe-scripted/scripts/javascript/barista.js: -------------------------------------------------------------------------------- 1 | importClass(org.springframework.integration.samples.cafe.Drink); 2 | importClass(java.lang.Thread); 3 | importClass(java.lang.System); 4 | 5 | function prepareDrink(orderItem){ 6 | Thread.sleep(timeToPrepare); 7 | System.out.println("javascript: preparing "+ orderItem + " for order "+ orderItem.getOrder().getNumber()) 8 | return new Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), 9 | orderItem.getShots()) 10 | } 11 | 12 | prepareDrink(payload); 13 | 14 | -------------------------------------------------------------------------------- /applications/file-split-ftp/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/tags/util/placeholder.tagx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /applications/loan-broker/src/main/resources/META-INF/spring/integration/bootstrap-config/stubbed-loan-broker.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'status: waiting-for-triage, type: enhancement' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Expected Behavior** 11 | 12 | 13 | 14 | **Current Behavior** 15 | 16 | 17 | 18 | **Context** 19 | 20 | 26 | -------------------------------------------------------------------------------- /intermediate/monitoring/src/main/webapp/WEB-INF/views/includes/taglibs.jsp: -------------------------------------------------------------------------------- 1 | <%@page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> 2 | 3 | <% 4 | response.setHeader("Cache-Control","no-cache"); 5 | response.setHeader("Pragma","no-cache"); 6 | response.setHeader("Expires","0"); 7 | %> 8 | 9 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 11 | <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /basic/feed/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/file/README.md: -------------------------------------------------------------------------------- 1 | File Sample 2 | =========== 3 | 4 | This example demonstrates the following aspects of the File operations support available with Spring Integration: 5 | 6 | 1. File Inbound Channel Adapter 7 | 2. File Outbound Channel Adapter 8 | 3. File-to-Bytes Transformer 9 | 10 | Furthermore, a Poller is used as well. 11 | 12 | The use case is a simple file copy, but implemented in 3 basic flavors: 13 | 14 | 1. Binary file copy 15 | 2. Text file copy 16 | 3. Simple file copy 17 | 18 | To run the samples simply execute the 3 test cases located in the **org.springframework.integration.samples.filecopy** package. -------------------------------------------------------------------------------- /basic/file/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/ftp/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/http/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/jdbc/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/jms/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/jmx/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/mail/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/quote/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/sftp/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/control-bus/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/enricher/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/helloworld/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/mongodb/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/oddeven/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/tcp-amqp/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/twitter/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /advanced/dynamic-ftp/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/jpa/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/rest-http/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/travel/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /applications/loan-broker/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/helloworld-groovy/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /basic/tcp-client-server/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /dsl/cafe-dsl/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /intermediate/async-gateway/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/dynamic-poller/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/errorhandling/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/monitoring/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/multipart-http/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/file-processing/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/mail-attachments/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /advanced/advanced-testing-examples/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/stored-procedures-derby/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/stored-procedures-ms/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/stored-procedures-oracle/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /intermediate/tcp-client-server-multiplex/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/header.jspx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /advanced/dynamic-tcp-client/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/index.jspx: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 |

7 | 8 |

9 |

10 | 11 |

12 |
13 |
-------------------------------------------------------------------------------- /basic/xml/src/main/resources/META-INF/spring/integration/bigBooksSupplierTransformer.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | smallbooks 10 | 5 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /basic/web-sockets/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /applications/cafe-scripted/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /applications/cafe/cafe-si/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /basic/zip/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /applications/README.md: -------------------------------------------------------------------------------- 1 | Applications Samples 2 | ==================== 3 | 4 | This category targets developers and architects who have a good understanding of the Messaging architecture, EIP and above average understanding of Spring and Spring integration and are looking for samples that address a particular business problem. In other word the emphasis of samples in this category is 'business use cases' and how it could be solved via Messaging architecture and Spring Integration in particular. For example; If you are interested to see how a Loan Broker process or Travel Agent process could be implemented and automated via Spring Integration this would be the right place to find these types of samples. 5 | 6 | -------------------------------------------------------------------------------- /applications/cafe/cafe-amqp/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /applications/cafe/cafe-jms/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /applications/loan-broker/src/main/resources/META-INF/spring/integration/bootstrap-config/stubbed-loan-broker-multicast.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /applications/loanshark/README.md: -------------------------------------------------------------------------------- 1 | Loan Shark Application 2 | ====================== 3 | 4 | See **README.txt** in the **loan-broker sample** for information about this sample. 5 | 6 | To change the multicast code in **udps.groovy** to rely on unicast instead, simply change the *MulticastSocket* type to *DatagramSocket* and remove the next 2 lines that deal with joining the multicast group. Then, in the configuration of the actual adapter, set: 7 | 8 | host="127.0.0.1" and multicast="false". 9 | 10 | For the Roo/Spring Integration application: 11 | 12 | * Edit the **integrationContext.xml** file 13 | * On the udpIn adapter, set **multicast** to false and 14 | * Remove the **multicast-address** attribute. -------------------------------------------------------------------------------- /basic/barrier/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/tcp-with-headers/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/xml/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /basic/xmpp/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /dsl/kafka-dsl/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | kafka: 2 | topic: si.topic 3 | newTopic: si.new.topic 4 | messageKey: si.key 5 | spring: 6 | kafka: 7 | consumer: 8 | group-id: siTestGroup 9 | auto-offset-reset: earliest 10 | enable-auto-commit: false 11 | value-deserializer: org.apache.kafka.common.serialization.StringDeserializer 12 | key-deserializer: org.apache.kafka.common.serialization.StringDeserializer 13 | producer: 14 | batch-size: 16384 15 | buffer-memory: 33554432 16 | retries: 0 17 | key-serializer: org.apache.kafka.common.serialization.StringSerializer 18 | value-serializer: org.apache.kafka.common.serialization.StringSerializer 19 | -------------------------------------------------------------------------------- /basic/ws-inbound-gateway/src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /intermediate/tx-synch/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /basic/amqp/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basic/kafka/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | kafka: 2 | topic: si.topic 3 | newTopic: si.new.topic 4 | messageKey: si.key 5 | spring: 6 | kafka: 7 | consumer: 8 | group-id: siTestGroup 9 | auto-offset-reset: earliest 10 | enable-auto-commit: false 11 | value-deserializer: org.apache.kafka.common.serialization.StringDeserializer 12 | key-deserializer: org.apache.kafka.common.serialization.StringDeserializer 13 | producer: 14 | batch-size: 16384 15 | buffer-memory: 33554432 16 | retries: 0 17 | key-serializer: org.apache.kafka.common.serialization.StringSerializer 18 | value-serializer: org.apache.kafka.common.serialization.StringSerializer 19 | 20 | 21 | -------------------------------------------------------------------------------- /intermediate/retry-and-more/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /basic/README.md: -------------------------------------------------------------------------------- 1 | Basic Samples 2 | ============= 3 | 4 | This is a good place to get started. The samples here are technically motivated and demonstrate the bare minimum with regard to configuration and code to help you to get introduced to the basic concepts, API and configuration of [Spring Integration](https://www.springsource.org/spring-integration) and how they relate to [Enterprise Integration Patterns](https://www.enterpriseintegrationpatterns.com/) (EIP). 5 | 6 | For example; if your are looking for an answer on how to wire a **Service Activator** to a **Channel** or how to apply a **Gateway** to your message exchange or how to get started with using the **Mail** or **XML** module etc., this would be the right place to find a good sample. -------------------------------------------------------------------------------- /basic/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | -------------------------------------------------------------------------------- /applications/loanshark/script.roo: -------------------------------------------------------------------------------- 1 | project --topLevelPackage org.springframework.samples.integration.loanbroker.loanshark3 2 | persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY 3 | entity --class ~.domain.LoanShark 4 | field string --fieldName name 5 | field number --type java.lang.Long --fieldName counter 6 | field number --type java.lang.Double --fieldName averageRate 7 | finder add --finderName findLoanSharksByName 8 | controller scaffold --class ~.web.SharkController 9 | logging setup --level DEBUG 10 | dependency add --artifactId org.springframework.integration.ip --groupId org.springframework.integration --version 2.0.0.M5 11 | //change spring version in pom.xml to 3.0.0.RELEASE-A before perform eclipse 12 | //perform eclipse 13 | -------------------------------------------------------------------------------- /basic/mqtt/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /basic/ws-outbound-gateway/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /dsl/cafe-dsl/README.md: -------------------------------------------------------------------------------- 1 | # Cafe Demo: Spring Integration Java DSL 2 | 3 | This sample demonstrates the classical Cafe Demo, but it is based on [Spring Integration Java DSL](https://github.com/spring-projects/spring-integration-extensions/wiki/Spring-Integration-Java-DSL-Reference) 4 | and [Spring Boot](https://projects.spring.io/spring-boot). 5 | 6 | See the `cafe` project **README.md** for more details about the domain and the Cafe algorithm. 7 | 8 | ## Run the Sample 9 | 10 | * You need Java 8 to run this sample, because it is based on Lambdas. 11 | * running the `org.springframework.integration.samples.dsl.cafe.lambda.Application` class from within STS (Right-click on 12 | Main class --> Run As --> Java Application) 13 | * or from the command line: 14 | 15 | $ gradlew :cafe-dsl:bootRun 16 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/checkstyle/checkstyle-header.txt: -------------------------------------------------------------------------------- 1 | ^\Q/*\E$ 2 | ^\Q * Copyright \E20\d\d\Q-present the original author or authors.\E$ 3 | ^\Q *\E$ 4 | ^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$ 5 | ^\Q * you may not use this file except in compliance with the License.\E$ 6 | ^\Q * You may obtain a copy of the License at\E$ 7 | ^\Q *\E$ 8 | ^\Q * https://www.apache.org/licenses/LICENSE-2.0\E$ 9 | ^\Q *\E$ 10 | ^\Q * Unless required by applicable law or agreed to in writing, software\E$ 11 | ^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$ 12 | ^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$ 13 | ^\Q * See the License for the specific language governing permissions and\E$ 14 | ^\Q * limitations under the License.\E$ 15 | ^\Q */\E$ 16 | ^$ 17 | ^.*$ 18 | -------------------------------------------------------------------------------- /.github/workflows/ci-snapshot.yml: -------------------------------------------------------------------------------- 1 | name: CI SNAPSHOT 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | push: 7 | branches: 8 | - main 9 | 10 | schedule: 11 | - cron: '0 5 * * *' 12 | 13 | concurrency: 14 | group: group-snapshot-for-${{ github.ref }} 15 | cancel-in-progress: true 16 | 17 | env: 18 | DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} 19 | 20 | jobs: 21 | build_snapshot: 22 | runs-on: ubuntu-latest 23 | name: CI Build SNAPSHOT for ${{ github.ref_name }} 24 | steps: 25 | 26 | - uses: actions/checkout@v5 27 | with: 28 | show-progress: false 29 | 30 | - name: Set up Gradle 31 | uses: spring-io/spring-gradle-build-action@v2 32 | with: 33 | java-version: 25 34 | 35 | - name: Build 36 | run: ./gradlew check 37 | 38 | -------------------------------------------------------------------------------- /intermediate/README.md: -------------------------------------------------------------------------------- 1 | Intermediate Samples 2 | ==================== 3 | 4 | This category targets developers who are already familiar with the [Spring Integration](https://www.springsource.org/spring-integration) framework (past getting started), but need some more guidance while resolving more advanced technical problems that they have to deal with once having switched to a Messaging architecture. 5 | 6 | For example; If you are looking for an answer on how to handle errors in various scenarios or how to properly configure the **Aggregator** for the situations where some messages might not ever arrive for aggregation etc., and any other issue that goes beyond a basic understanding and configuration of a particular component and addresses "what else you can do with it" type of problem, this would be the right place to find these type of samples. 7 | -------------------------------------------------------------------------------- /basic/control-bus/README.md: -------------------------------------------------------------------------------- 1 | Control Bus Sample 2 | ================== 3 | 4 | This example demonstrates the functionality of the Control Bus component available with Spring Integration. The Control Bus uses SpEL to send a Control Message to start/stop an inbound adapter. To run the Control Bus sample simply execute **ControlBusDemoTest** in the **org.springframework.integration.samples.controlbus** package. 5 | 6 | You will see output similar to this: 7 | 8 | INFO : org.springframework.integration.samples.jmx.ControlBusDemo - Received before adapter started: null 9 | INFO : org.springframework.integration.samples.jmx.ControlBusDemo - Received before adapter started: [Payload=Hello][Headers={timestamp=1294950897714, id=240e72fb-93b0-4d38-8fe8-b701cf7e9a5d}] 10 | INFO : org.springframework.integration.samples.jmx.ControlBusDemo - Received after adapter stopped: null 11 | 12 | -------------------------------------------------------------------------------- /advanced/advanced-testing-examples/README.md: -------------------------------------------------------------------------------- 1 | Advanced Testing Examples 2 | ========================= 3 | 4 | Example test cases that show advanced techniques to test Spring Integration based applications. 5 | 6 | For basic testing examples see: **basic/testing-examples** 7 | 8 | ## Examples 9 | 10 | **jms.JmsMockTests.java** 11 | 12 | This test case shows how to test an integration flow that uses JMS inbound channel adapter by using **Mockito** to mock a *JmsTemplate* (and dependent JMS objects). The example flow in **src/main/resources/integration-config.xml** does not depend on JMS but includes some additional error handling on **errorChannel**. The **errorChannel** is configured on the JMS adapter. So we want test the entire flow for cases in which an invalid message is received via JMS and routed to **errorChannel**. How do we do this without requiring a JMS message broker? -------------------------------------------------------------------------------- /intermediate/rest-http/src/main/webapp/WEB-INF/config/web-application-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /applications/file-split-ftp/README.adoc: -------------------------------------------------------------------------------- 1 | :imagesdir: ./images 2 | 3 | = File Split and FTP Sample 4 | 5 | - Looks for files `*.txt` in `/tmp/in` 6 | - Reads file and writes to 3 files based on account (first 4 bytes in file) 7 | - FileSplitter -> router [lines -> `lines`], [file marks -> `marks`] 8 | - `marks` filters on EOF marker (drops SOF) 9 | - pubsub [flush files], [ftp (x3)], [email result] 10 | - Exceptions go to `tfrErrors` - sends failure email 11 | - input file is renamed, based on final disposition 12 | 13 | Test cases are provided for happy path and failure scenarios 14 | 15 | Run `ApplicationTests` as a JUnit test from your IDE. 16 | 17 | = Flow Visualization 18 | 19 | This visualization is generated by the https://github.com/spring-projects/spring-flo/[Spring Integration Flow Viewer] which is currently under development. 20 | 21 | image::flo1.png[] 22 | 23 | image::flo2.png[] 24 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/layouts/layouts.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/chain/SpelChainTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/gateway/GatewayTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/splitter/CommaDelimitedSplitterTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/META-INF/spring/integration/02-splitter/integration-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/aggregator/CommaDelimitedAggregatorTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/tags/menu/menu.tagx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
    10 | 11 |
12 |
13 |
-------------------------------------------------------------------------------- /basic/tcp-broadcast/README.adoc: -------------------------------------------------------------------------------- 1 | == TCP Broadcast Sample 2 | 3 | This sample demonstrates broadcasting a message received by a web controller to all connected TCP clients. 4 | 5 | `curl -X POST http://localhost:8080/broadcast/foo` will send 'foo' to 5 connected clients. 6 | 7 | The TCP server listens on port 1234. 8 | 9 | 10 | `2018-11-19 12:01:48.546 INFO 98411 --- [ main] com.example.TcpBroadcastApplication : Started TcpBroadcastApplication in 1.904 seconds (JVM running for 2.345)` 11 | `connected! from client# 5` 12 | `connected! from client# 4` 13 | `connected! from client# 3` 14 | `connected! from client# 2` 15 | `connected! from client# 1` 16 | 17 | `curl -X POST http://localhost:8080/broadcast/foo` 18 | 19 | `foo from client# 4` 20 | `foo from client# 5` 21 | `foo from client# 2` 22 | `foo from client# 1` 23 | `foo from client# 3` 24 | 25 | To shut down the application: 26 | 27 | `curl http://localhost:8080/shutdown` 28 | -------------------------------------------------------------------------------- /intermediate/stored-procedures-postgresql/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /basic/http/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | multipart-http 4 | 5 | Multipart 6 | org.springframework.web.servlet.DispatcherServlet 7 | 8 | contextConfigLocation 9 | /WEB-INF/servlet-config.xml 10 | 11 | 1 12 | 13 | 14 | Multipart 15 | /* 16 | 17 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/META-INF/spring/integration/05-router/integration-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | maven { url = 'https://repo.spring.io/milestone' } 6 | maven { url = 'https://repo.spring.io/snapshot' } 7 | } 8 | } 9 | 10 | plugins { 11 | id 'io.spring.develocity.conventions' version '0.0.21' 12 | } 13 | 14 | rootProject.name = 'spring-integration-samples' 15 | 16 | ['advanced', 'applications', 'basic', 'intermediate', 'dsl'].each { 17 | def projectDir = new File(rootDir, it) 18 | include ":${it}" 19 | projectDir.eachDir { dir -> 20 | if (!dir.name.startsWith('.') && 'splunk' != dir.name) { 21 | include ":${dir.name}" 22 | project(":${dir.name}").projectDir = new File(projectDir.absolutePath, dir.name) 23 | if ('cafe' == dir.name) { 24 | dir.eachDir { cafe -> 25 | include ":${cafe.name}" 26 | project(":${cafe.name}").projectDir = new File(dir.absolutePath, cafe.name) 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'type: bug, status: waiting-for-triage' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **In what version(s) of Spring Integration are you seeing this issue?** 11 | 12 | For example: 13 | 14 | 2.5.3 15 | 16 | Between 2.5.0 and 3.0.0 17 | 18 | **Describe the bug** 19 | 20 | A clear and concise description of what the bug is. 21 | 22 | **To Reproduce** 23 | 24 | Steps to reproduce the behavior. 25 | 26 | **Expected behavior** 27 | 28 | A clear and concise description of what you expected to happen. 29 | 30 | **Sample** 31 | 32 | A link to a GitHub repository with a [minimal, reproducible sample](https://stackoverflow.com/help/minimal-reproducible-example). 33 | 34 | Reports that include a sample will take priority over reports that do not. 35 | At times, we may require a sample, so it is good to try and include a sample up front. 36 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/META-INF/spring/integration/08-errorhandling/integration-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/META-INF/spring/integration/07-gateway/integration-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /intermediate/multipart-http/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | multipart-http 4 | 5 | Multipart 6 | org.springframework.web.servlet.DispatcherServlet 7 | 8 | contextConfigLocation 9 | /WEB-INF/servlet-config.xml 10 | 11 | 1 12 | 13 | 14 | Multipart 15 | *.htm 16 | 17 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/menu.jspx: -------------------------------------------------------------------------------- 1 | 2 | 13 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/views.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /basic/jpa/README.md: -------------------------------------------------------------------------------- 1 | Spring Integration - JPA Sample 2 | ================================ 3 | 4 | # Overview 5 | 6 | This sample illustrates how the JPA Components can be used. The example presented covers the following use cases 7 | 8 | * List all people from the database 9 | * Create a new Person record in the database 10 | 11 | The first example demonstrates the use of an JPA Outbound gateway to retrieve a list of people. The second example uses an JPA Outbound Gateway in order to create a new Person record and then return the newly created Person record. 12 | 13 | Hibernate works out of the box and there are 2 options on how to execute the sample: 14 | 15 | * running the "Main" class from within STS (Right-click on Main class --> Run As --> Java Application) 16 | * or from the command line: 17 | $ gradlew :jpa:run 18 | 19 | # Resources 20 | 21 | For help please take a look at the Spring Integration documentation: 22 | 23 | https://www.springsource.org/spring-integration 24 | 25 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/META-INF/spring/integration/01-chain/integration-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/DrinkType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.cafe; 18 | 19 | /** 20 | * @author Mark Fisher 21 | */ 22 | public enum DrinkType { 23 | 24 | ESPRESSO, 25 | LATTE, 26 | CAPPUCCINO, 27 | MOCHA 28 | 29 | } 30 | -------------------------------------------------------------------------------- /basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.tcpclientserver; 18 | 19 | /** 20 | * @author Gary Russell 21 | * 22 | */ 23 | public interface SimpleGateway { 24 | 25 | String send(String text); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /basic/http/src/main/java/org/springframework/integration/samples/http/RequestGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.http; 18 | 19 | /** 20 | * @author Oleg Zhurakousky 21 | * @author Gunnar Hillert 22 | * 23 | */ 24 | public interface RequestGateway { 25 | 26 | String echo(String request); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /basic/barrier/src/main/java/org/springframework/integration/samples/barrier/RequestGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.barrier; 18 | 19 | /** 20 | * @author Oleg Zhurakousky 21 | * @author Gunnar Hillert 22 | * 23 | */ 24 | public interface RequestGateway { 25 | 26 | String echo(String request); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/Result.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator; 18 | 19 | /** 20 | * The result for a search query. 21 | * 22 | * @author Christopher Hunt 23 | * 24 | */ 25 | public class Result { 26 | } 27 | -------------------------------------------------------------------------------- /basic/control-bus/src/main/resources/META-INF/spring/integration/ControlBusDemo-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/errorhandling/GatewayTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /basic/ftp/src/test/java/org/springframework/integration/samples/ftp/ToFtpFlowGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.ftp; 18 | 19 | import java.util.List; 20 | 21 | /** 22 | * @author Gary Russell 23 | * @since 2.1 24 | * 25 | */ 26 | interface ToFtpFlowGateway { 27 | 28 | List lsGetAndRmFiles(String dir); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /basic/sftp/src/test/java/org/springframework/integration/samples/sftp/ToSftpFlowGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.sftp; 18 | 19 | import java.util.List; 20 | 21 | /** 22 | * @author Gary Russell 23 | * @since 2.1 24 | * 25 | */ 26 | interface ToSftpFlowGateway { 27 | 28 | List lsGetAndRmFiles(String dir); 29 | } 30 | -------------------------------------------------------------------------------- /basic/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ws:inbound-gateway sample 4 | 5 | 6 | spring-ws 7 | org.springframework.ws.transport.http.MessageDispatcherServlet 8 | 9 | contextConfigLocation 10 | WEB-INF/spring-ws-config.xml 11 | 12 | 1 13 | 14 | 15 | 16 | spring-ws 17 | /echoservice 18 | 19 | 20 | 21 | index.html 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/DrinkType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.cafe; 18 | 19 | import java.io.Serializable; 20 | 21 | /** 22 | * @author Mark Fisher 23 | */ 24 | public enum DrinkType implements Serializable { 25 | 26 | ESPRESSO, 27 | LATTE, 28 | CAPPUCCINO, 29 | MOCHA 30 | 31 | } 32 | -------------------------------------------------------------------------------- /basic/helloworld/src/main/resources/META-INF/spring/integration/helloWorldDemo.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/i18n/application.properties: -------------------------------------------------------------------------------- 1 | #Updated at Tue Sep 07 17:11:50 EDT 2010 2 | #Tue Sep 07 17:11:50 EDT 2010 3 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_averagerate=Average Rate 4 | menu_item_loanshark_new_label=Loan Shark 5 | menu_item_loanshark_name_label=Name 6 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_version=Version 7 | application_name=Loanshark 8 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_name=Name 9 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_plural=Loan Sharks 10 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark=Loan Shark 11 | menu_category_loanshark_label=Loan Shark 12 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_id=Id 13 | menu_item_loanshark_list_label=Loan Sharks 14 | label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_counter=Counter 15 | -------------------------------------------------------------------------------- /basic/helloworld-kotlin/src/main/kotlin/org/springframework/integration/samples/helloworld/HelloService.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.helloworld 18 | 19 | /** 20 | * Simple POJO to be referenced from a Service Activator. 21 | * 22 | * @author Glenn Renfro 23 | */ 24 | class HelloService { 25 | 26 | fun sayHello(name: String) = "Hello $name" 27 | 28 | } 29 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/support/CriteriaA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator.support; 18 | 19 | /** 20 | * One type of criteria. 21 | * 22 | * @author Christopher Hunt 23 | * 24 | */ 25 | public class CriteriaA extends AbstractCriteria { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/support/CriteriaB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator.support; 18 | 19 | /** 20 | * Another type of criteria. 21 | * 22 | * @author Christopher Hunt 23 | * 24 | */ 25 | public class CriteriaB extends AbstractCriteria { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /basic/barrier/src/main/java/org/springframework/integration/samples/barrier2/Gateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.barrier2; 18 | 19 | import java.util.Collection; 20 | 21 | /** 22 | * @author Gary Russell 23 | * @since 4.2 24 | * 25 | */ 26 | public interface Gateway { 27 | 28 | void process(Collection numbers, String correlationId); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /intermediate/async-gateway/src/main/java/org/springframework/integration/samples/async/gateway/MathServiceGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.async.gateway; 18 | 19 | import java.util.concurrent.Future; 20 | 21 | /** 22 | * @author Oleg Zhurakousky 23 | * 24 | */ 25 | public interface MathServiceGateway { 26 | 27 | Future multiplyByTwo(int i); 28 | } 29 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/support/AbstractCriteria.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator.support; 18 | 19 | /** 20 | * A class that represents all criteria. 21 | * 22 | * @author Christopher Hunt 23 | * 24 | */ 25 | public abstract class AbstractCriteria { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /intermediate/tcp-client-server-multiplex/src/main/java/org/springframework/integration/samples/tcpclientserver/SimpleGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.tcpclientserver; 18 | 19 | /** 20 | * @author Gary Russell 21 | * @author Gunnar Hillert 22 | * @since 2.1 23 | * 24 | */ 25 | public interface SimpleGateway { 26 | 27 | String send(String text); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /applications/cafe/cafe-jms/src/main/resources/META-INF/spring/integration/activemq/cafeDemo-amq-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /advanced/dynamic-ftp/src/test/resources/META-INF/spring/integration/DynamicFtpOutboundChannelAdapterSample-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /basic/helloworld-groovy/src/main/groovy/org/springframework/integration/samples/helloworld/HelloService.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.helloworld 18 | 19 | /** 20 | * Simple POJO to be referenced from a Service Activator. 21 | * 22 | * @author Glenn Renfro 23 | */ 24 | class HelloService { 25 | 26 | String sayHello(String name) { 27 | "Hello $name" 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /basic/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.helloworld; 18 | 19 | /** 20 | * Simple POJO to be referenced from a Service Activator. 21 | * 22 | * @author Mark Fisher 23 | */ 24 | public class HelloService { 25 | 26 | public String sayHello(String name) { 27 | return "Hello " + name; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /intermediate/stored-procedures-derby/README.md: -------------------------------------------------------------------------------- 1 | Spring Integration - Stored Procedure Example - Derby 2 | ================================================================================ 3 | 4 | # Overview 5 | 6 | This example provides a simple example using the stored procedure Outbound Gateway 7 | adapter. This example will call 2 Derby Stored Procedures. 8 | 9 | One procedure uses an **Out** Parameter to return values and the second procedure 10 | returns a **ResultSet**. 11 | 12 | # Setup 13 | 14 | Just make sure you have Gradle set up and that the project builds successfully. 15 | 16 | # Run the Sample 17 | 18 | * running the "Main" class from within STS (Right-click on Main class --> Run As --> Java Application) 19 | * or from the command line: 20 | 21 | $ gradlew :stored-procedures-derby:run 22 | 23 | * Follow the screen (command line) instructions. 24 | 25 | -------------------------------------------------------------------------------- 26 | 27 | For help please take a look at the Spring Integration documentation: 28 | 29 | https://www.springsource.org/spring-integration 30 | 31 | -------------------------------------------------------------------------------- /applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/WaiterMonitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.cafe; 18 | 19 | /** 20 | * Send a groovy script to the control bus and return the result 21 | * 22 | * @author David Turanski 23 | * @author Artem Bilan 24 | * 25 | */ 26 | public interface WaiterMonitor { 27 | 28 | Integer sendControlScript(String script); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /basic/ws-inbound-gateway/src/main/resources/META-INF/spring/integration/inbound-gateway-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/externalgateway/WeatherAndTraffic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.testing.externalgateway; 18 | 19 | import java.util.List; 20 | 21 | /** 22 | * @author Gary Russell 23 | * @author Gunnar Hillert 24 | * @since 2.0.2 25 | * 26 | */ 27 | public interface WeatherAndTraffic { 28 | 29 | List getByZip(String zip); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /intermediate/monitoring/src/main/webapp/WEB-INF/views/twitterMessages.jsp: -------------------------------------------------------------------------------- 1 | <%@ include file="/WEB-INF/views/includes/taglibs.jsp"%> 2 |

This example searches Twitter and shows the results below.

3 |
    4 | 5 | 6 | 7 |
  • 8 | ${twitterMessage.fromUser} 12 |
  • 13 |
    14 |
    15 | No Twitter messages found. Did you start the search? 16 |
    17 |
18 | -------------------------------------------------------------------------------- /dsl/si4demo/src/main/resources/BXMLAndPojo-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /advanced/dynamic-tcp-client/src/test/java/org/springframework/integration/samples/dynamictcp/DynamicTcpClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.dynamictcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.boot.test.context.SpringBootTest; 22 | 23 | @SpringBootTest 24 | public class DynamicTcpClientApplicationTests { 25 | 26 | @Test 27 | public void contextLoads() { 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /basic/mqtt/README.md: -------------------------------------------------------------------------------- 1 | Spring Integration - MQTT Sample 2 | ================================ 3 | 4 | # Overview 5 | 6 | This sample demonstrates basic functionality of the **Spring Integration MQTT Adapters**. 7 | 8 | It assumes a broker is running on localhost on port 1883. 9 | 10 | Once the application is started, you enter some text on the command prompt and a message containing that entered text is 11 | dispatched to the MQTT topic. In return that message is retrieved by Spring Integration and then logged. 12 | 13 | # How to Run the Sample 14 | 15 | If you imported the example into your IDE, you can just run class **org.springframework.integration.samples.mqtt.Application**. 16 | For example in [SpringSource Tool Suite](https://www.springsource.com/developer/sts) (STS) do: 17 | 18 | * Right-click on SampleSimple class --> Run As --> Spring Boot App 19 | 20 | (or run from the boot console). 21 | 22 | Alternatively, you can start the sample from the command line: 23 | 24 | * ./gradlew :mqtt:run 25 | 26 | Enter some data (e.g. `foo`) on the console; you will see `foo sent to MQTT, received from MQTT` 27 | 28 | Ctrl-C to terminate. 29 | 30 | -------------------------------------------------------------------------------- /basic/helloworld/src/main/resources/META-INF/spring/integration/delay.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /intermediate/travel/src/main/java/org/springframework/integration/samples/travel/WeatherRequestTransformer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.travel; 18 | 19 | public class WeatherRequestTransformer { 20 | 21 | public String transform(City city) { 22 | return "" + 23 | " " + city.getPostalCode() + "" + 24 | ""; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkTransformer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.loanbroker.loanshark.biz; 18 | 19 | /** 20 | * @author Gary Russell 21 | * 22 | */ 23 | public class SharkTransformer { 24 | 25 | public SharkQuote transform(byte[] buffer) { 26 | String[] data = new String(buffer).split(","); 27 | return new SharkQuote(data[0], Double.parseDouble(data[1])); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/filter/PetFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.testing.filter; 18 | 19 | import org.springframework.integration.annotation.Filter; 20 | 21 | /** 22 | * @author Gary Russell 23 | * @since 2.0.2 24 | * 25 | */ 26 | public class PetFilter { 27 | 28 | @Filter 29 | public boolean dogsOnly(String input) { 30 | return input.toLowerCase().contains("dog"); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /advanced/README.md: -------------------------------------------------------------------------------- 1 | Advanced Samples 2 | ================ 3 | 4 | This category targets advanced developers who are well familiar with the [Spring Integration](https://www.springsource.org/spring-integration) framework but are looking to extend it to address a specific custom need by extending from Spring Integration's public API. 5 | 6 | For example; if you are looking for samples showing you how to implement a custom **Channel** or **Consumer** (event-based or polling-based), or if you trying to figure out what is the most appropriate way to implement a custom **BeanParser** on top of the Spring Integration BeanParser hierarchy when implementing custom namespaces, this would be the right place to look. 7 | 8 | Here you can also find samples that will help you with adapter development. Spring Integration comes with an extensive library of adapters that allow you to connect remote systems with Spring Integration messaging framework. However you might have a need to integrate with systems for which the core framework does not provide an adapter and consequently you may have to implement your own adapter. This category would include samples showing you how to implement various adapters. 9 | -------------------------------------------------------------------------------- /basic/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.quote; 18 | 19 | import java.util.Random; 20 | 21 | /** 22 | * @author Mark Fisher 23 | */ 24 | public class TickerStream { 25 | 26 | public String nextTicker() { 27 | char[] chars = new char[3]; 28 | for (int i = 0; i < 3; i++) { 29 | chars[i] = (char) (new Random().nextInt(25) + 65); 30 | } 31 | return new String(chars); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /dsl/si4demo/src/main/resources/AXML-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /intermediate/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.errorhandling; 18 | 19 | /** 20 | * @author Iwein Fuld 21 | */ 22 | public class Invitation { 23 | 24 | private final int number; 25 | 26 | public Invitation(int number) { 27 | this.number = number; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return "Invitation number " + this.number; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /intermediate/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartRequestGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.multipart; 18 | 19 | import java.util.Map; 20 | 21 | import org.springframework.http.HttpStatus; 22 | 23 | /** 24 | * @author ozhurakousky 25 | * @author Gunnar Hillert 26 | * 27 | */ 28 | public interface MultipartRequestGateway { 29 | 30 | HttpStatus postMultipartRequest(Map multipartRequest); 31 | } 32 | -------------------------------------------------------------------------------- /basic/feed/src/test/resources/META-INF/spring/integration/FeedInboundChannelAdapterSample-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /applications/cafe-scripted/src/main/java/org/springframework/integration/samples/cafe/Customer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.cafe; 18 | 19 | /** 20 | * @author David Turanski 21 | * 22 | */ 23 | public class Customer { 24 | 25 | int orderNumber = 1; 26 | 27 | public Order getOrder() { 28 | Order order = new Order(this.orderNumber++); 29 | order.addItem(DrinkType.LATTE, 2, false); 30 | order.addItem(DrinkType.MOCHA, 3, true); 31 | return order; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/loansharks/views.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/quote/README.md: -------------------------------------------------------------------------------- 1 | Quote Sample 2 | ============ 3 | 4 | This example demonstrates the following aspects of the CORE EIP support available with Spring Integration: 5 | 6 | 1. Channel Adapter (Inbound and Stdout) 7 | 2. Poller with Interval Triggers 8 | 3. Service Activator 9 | 10 | It is a very simple example that introduces you to Channel adapters and Pollers. 11 | 12 | Messages are simply being emitted by the *Poller* (interval based) triggering the **nextTicker()** method of the *TickerStream* class and are then sent to a **tickers** channel, from which they are retrieved by the *TickerStream* service. 13 | 14 | The *TickerStream* service generates random ticker symbols, sending them to the **quotes** channel, from which they are retrieved by the *QuoteService* (annotation based Service Activator). The *QuoteService* generates random quotes, sending them to the *Stdout Channel Adapter*, where they are printed to the console. 15 | 16 | To execute sample simply run **QuoteDemoTest**. You should see the output similar to this: 17 | 18 | XNY: 90.03 19 | XMR: 17.11 20 | IWR: 35.85 21 | KHR: 54.43 22 | WUW: 95.29 23 | YYC: 7.44 24 | DYW: 84.76 25 | TIW: 28.31 26 | HGE: 28.90 27 | 28 | 29 | -------------------------------------------------------------------------------- /intermediate/travel/src/main/java/org/springframework/integration/samples/travel/TravelGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.travel; 18 | 19 | /** 20 | * Central business interface which is used to retrieve weather and traffic 21 | * information for the provided {@link City}. 22 | * 23 | * @author Gunnar Hillert 24 | * @since 2.2 25 | * 26 | */ 27 | public interface TravelGateway { 28 | 29 | String getWeatherByCity(City city); 30 | 31 | String getTrafficByCity(City city); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /applications/cafe/cafe-si/src/main/java/org/springframework/integration/samples/cafe/xml/Waiter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.cafe.xml; 18 | 19 | import java.util.List; 20 | 21 | import org.springframework.integration.samples.cafe.Delivery; 22 | import org.springframework.integration.samples.cafe.Drink; 23 | 24 | /** 25 | * @author Marius Bogoevici 26 | */ 27 | public class Waiter { 28 | 29 | public Delivery prepareDelivery(List drinks) { 30 | return new Delivery(drinks); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /basic/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.jms; 18 | 19 | import org.springframework.integration.annotation.MessageEndpoint; 20 | import org.springframework.integration.annotation.ServiceActivator; 21 | 22 | /** 23 | * @author Mark Fisher 24 | */ 25 | @MessageEndpoint 26 | public class DemoBean { 27 | 28 | @ServiceActivator 29 | public String upperCase(String input) { 30 | return "JMS response: " + input.toUpperCase(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /intermediate/async-gateway/src/main/java/org/springframework/integration/samples/async/gateway/MathService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.async.gateway; 18 | 19 | import java.util.Random; 20 | 21 | /** 22 | * @author Oleg Zhurakousky 23 | * 24 | */ 25 | public class MathService { 26 | private final Random random = new Random(); 27 | 28 | public int multiplyByTwo(int i) throws Exception { 29 | long sleep = this.random.nextInt(10) * 100; 30 | Thread.sleep(sleep); 31 | return i * 2; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/layouts/default.jspx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | <spring:message code="welcome_h3" arguments="${app_name}" /> 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /basic/jdbc/src/main/java/org/springframework/integration/samples/jdbc/domain/UserMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.jdbc.domain; 18 | 19 | import java.sql.ResultSet; 20 | import java.sql.SQLException; 21 | 22 | import org.springframework.jdbc.core.RowMapper; 23 | 24 | public class UserMapper implements RowMapper { 25 | 26 | public User mapRow(ResultSet rs, int rowNum) throws SQLException { 27 | return new User(rs.getString("username"), rs.getString("password"), rs.getString("email")); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /intermediate/travel/src/main/resources/META-INF/spring/integration-ws-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basic/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.quote; 18 | 19 | import java.math.BigDecimal; 20 | 21 | /** 22 | * @author Mark Fisher 23 | */ 24 | public class Quote { 25 | 26 | private final String ticker; 27 | 28 | private final BigDecimal price; 29 | 30 | public Quote(String ticker, BigDecimal price) { 31 | this.ticker = ticker; 32 | this.price = price; 33 | } 34 | 35 | public String toString() { 36 | return this.ticker + ": " + this.price; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/java/org/springframework/integration/samples/testing/gateway/VoidGateway.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.testing.gateway; 18 | 19 | import org.springframework.integration.file.FileHeaders; 20 | import org.springframework.messaging.handler.annotation.Header; 21 | 22 | /** 23 | * @author Gary Russell 24 | * @author Gunnar Hillert 25 | * 26 | * @since 2.0.2 27 | * 28 | */ 29 | public interface VoidGateway { 30 | 31 | void process(String thing, @Header(FileHeaders.FILENAME) String fileName); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/filter/PetFilterTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /applications/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/router/PetRouterTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /dsl/si4demo/src/test/java/org/springframework/integration/samples/si4demo/ApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.si4demo; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.boot.test.context.SpringBootTest; 22 | import org.springframework.integration.samples.si4demo.annotations.Application; 23 | 24 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class) 25 | public class ApplicationTests { 26 | 27 | @Test 28 | public void contextLoads() { 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /intermediate/stored-procedures-oracle/src/main/java/org/springframework/integration/service/StringConversionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.service; 18 | 19 | /** 20 | * Provides string manipulation services. 21 | */ 22 | public interface StringConversionService { 23 | 24 | /** 25 | * Converts a String to Upper Case. 26 | * 27 | * @param stringToConvert The string to convert to upper case 28 | * @return The converted upper case string. 29 | */ 30 | String convertToUpperCase(String stringToConvert); 31 | 32 | Integer getNumber(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /basic/testing-examples/src/main/resources/META-INF/spring/integration/06-filter/integration-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /dsl/cafe-dsl/src/test/java/org/springframework/integration/samples/dsl/cafe/ApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.dsl.cafe; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.boot.test.context.SpringBootTest; 22 | import org.springframework.integration.samples.dsl.cafe.lambda.Application; 23 | 24 | /** 25 | * @author Artem Bilan 26 | * 27 | * @since 3.0 28 | */ 29 | @SpringBootTest(classes = Application.class) 30 | public class ApplicationTests { 31 | 32 | @Test 33 | public void contextLoads() { 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /advanced/dynamic-tcp-client/README.adoc: -------------------------------------------------------------------------------- 1 | = Dynamic TCP Client 2 | 3 | Demonstrates a technique to dynamically add TCP clients on-demand, with caching and LRU removal. 4 | 5 | Uses the https://docs.spring.io/spring-integration/reference/html/java-dsl.html#java-dsl-runtime-flows[Spring Integration Java DSL] Runtime flow registration feature. 6 | 7 | The code starts two inbound channel adapters on ports 1234 and 5678 and sends a message to each. 8 | 9 | Run from your favorite IDE, or from the command line `./gradlew :dynamic-tcp-client:run`. 10 | 11 | The output messages show that each was received from a different socket... 12 | 13 | ``` 14 | GenericMessage [payload=byte[3], headers={ip_tcp_remotePort=59000, ip_connectionId=localhost:59000:1234:fe482d5d-46d2-4708-bde8-afdcee6d3275, ip_localInetAddress=/127.0.0.1, ip_address=127.0.0.1, history=inOne,outputChannel, id=4c66210d-3855-28ad-833c-f6862d4263fb, ip_hostname=localhost, timestamp=1474483130778}] 15 | GenericMessage [payload=byte[3], headers={ip_tcp_remotePort=59001, ip_connectionId=localhost:59001:5678:e54f0ffe-83bc-40de-861f-9fa03df6e43d, ip_localInetAddress=/127.0.0.1, ip_address=127.0.0.1, history=inTwo,outputChannel, id=d6bd4319-00e1-550d-9511-3348d7fae907, ip_hostname=localhost, timestamp=1474483130784}] 16 | ``` 17 | -------------------------------------------------------------------------------- /basic/tcp-client-server/src/main/java/org/springframework/integration/samples/tcpclientserver/EchoService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.tcpclientserver; 18 | 19 | /** 20 | * Simple service that receives data in a byte array, 21 | * converts it to a String and appends it to 'echo:'. 22 | * 23 | * @author Gary Russell 24 | * 25 | */ 26 | public class EchoService { 27 | 28 | public String test(String input) { 29 | if ("FAIL".equals(input)) { 30 | throw new RuntimeException("Failure Demonstration"); 31 | } 32 | return "echo:" + input; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchRequestor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator; 18 | 19 | import org.springframework.integration.samples.splitteraggregator.support.CompositeCriteria; 20 | 21 | /** 22 | * A service interface responsible for performing a search and returning a 23 | * result synchronously. 24 | * 25 | * @author Christopher Hunt 26 | * 27 | */ 28 | public interface SearchRequestor { 29 | 30 | CompositeResult search(CompositeCriteria criteria); 31 | } 32 | -------------------------------------------------------------------------------- /applications/stomp-chat/src/test/java/org/springframework/integration/samples/chat/stomp/server/ApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.chat.stomp.server; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.boot.test.context.SpringBootTest; 22 | 23 | /** 24 | * @author Artem Bilan 25 | * 26 | * @since 3.0 27 | */ 28 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class) 29 | public class ApplicationTests { 30 | 31 | @Test 32 | public void testWebSockets() { 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /basic/testing-examples/src/test/java/org/springframework/integration/samples/testing/externalgateway/ExternalGatewaySubstitutionTests-context.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /basic/web-sockets/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Time over WebSocket 5 | 6 | 19 | 20 | 21 | 22 | 24 |
Starting...
33 | 34 | 35 | -------------------------------------------------------------------------------- /basic/twitter/src/test/java/org/springframework/integration/samples/twitter/TwitterSearchSample.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.twitter; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.context.support.ClassPathXmlApplicationContext; 22 | 23 | /** 24 | * @author Oleg Zhurakousky 25 | * 26 | */ 27 | public class TwitterSearchSample { 28 | 29 | @Test 30 | public void runDemo() throws Exception { 31 | new ClassPathXmlApplicationContext("META-INF/spring/integration/TwitterSearch-context.xml"); 32 | 33 | Thread.sleep(5000); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /basic/http/src/main/resources/META-INF/spring/integration/http-outbound-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/CompositeResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator; 18 | 19 | import java.util.ArrayList; 20 | import java.util.Collection; 21 | 22 | /** 23 | * A result that can contain other results. 24 | * 25 | * @author Christopher Hunt 26 | * 27 | */ 28 | public class CompositeResult extends Result { 29 | private final Collection results = new ArrayList(); 30 | 31 | public Collection getResults() { 32 | return this.results; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /basic/helloworld-kotlin/src/test/kotlin/org/springframework/integration/samples/helloworld/HelloServiceTests.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.helloworld 18 | 19 | import org.assertj.core.api.Assertions.assertThat 20 | import org.junit.jupiter.api.Test 21 | 22 | /** 23 | * Unit tests for HelloService. 24 | * 25 | * @author Glenn Renfro 26 | */ 27 | class HelloServiceTests { 28 | 29 | @Test 30 | fun testSayHello() { 31 | val service = HelloService() 32 | val result = service.sayHello("World") 33 | assertThat(result).isEqualTo("Hello World") 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /basic/helloworld-groovy/src/test/groovy/org/springframework/integration/samples/helloworld/HelloServiceTests.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.helloworld 18 | 19 | import org.junit.jupiter.api.Test 20 | 21 | import static org.assertj.core.api.Assertions.assertThat 22 | 23 | 24 | /** 25 | * Unit tests for HelloService. 26 | * 27 | * @author Glenn Renfro 28 | */ 29 | class HelloServiceTests { 30 | 31 | @Test 32 | void testSayHello() { 33 | def service = new HelloService() 34 | def result = service.sayHello('World') 35 | assertThat(result).isEqualTo('Hello World') 36 | } 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /basic/jms/src/main/resources/META-INF/spring/integration/outboundChannelAdapter.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /basic/xmpp/README.md: -------------------------------------------------------------------------------- 1 | XMPP Sample 2 | =========== 3 | 4 | This example was prepared for testing with [Google Talk][] and demonstrates the following aspects of the [Extensible Messaging and Presence Protocol][] (XMPP) support available with *Spring Integration*: 5 | 6 | 1. XMPP Inbound Channel Adapter - receive instant messages. 7 | 2. XMPP Outbound Channel Adapter - send instant messages. 8 | 9 | In order to run this sample you need to provide correct values in **xmpp.properties**. 10 | Everything there was already preset. The only 3 properties you need to provide values for are: 11 | 12 | * user.login 13 | * user.password 14 | * send.to.user 15 | 16 | You'll also need to test it with your friend or have two Google accounts setup. 17 | 18 | To test **SendInstantMessageSample.java**, first log on to the account identified via **send.to.user** property and make sure that that account is in your buddy list. Then run the demo. 19 | To test **ReceiveInstantMessageSample.java**, first log on to the account identified via **send.to.user** property. Then run the demo. Now any instant messages sent to your account appear in the console. 20 | 21 | [Google Talk]: https://www.google.com/talk/ 22 | [Extensible Messaging and Presence Protocol]: https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol 23 | -------------------------------------------------------------------------------- /intermediate/splitter-aggregator-reaper/src/main/java/org/springframework/integration/samples/splitteraggregator/SearchResultAggregator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.splitteraggregator; 18 | 19 | import java.util.Collection; 20 | 21 | /** 22 | * Aggregate a collection of results into a composite result object. 23 | * 24 | * @author Christopher Hunt 25 | * 26 | */ 27 | public class SearchResultAggregator { 28 | public Result aggregate(Collection results) { 29 | CompositeResult result = new CompositeResult(); 30 | result.getResults().addAll(results); 31 | return result; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /basic/twitter/src/test/java/org/springframework/integration/samples/twitter/TwitterTimelineUpdatesSample.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.twitter; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.context.support.ClassPathXmlApplicationContext; 22 | 23 | /** 24 | * @author Oleg Zhurakousky 25 | * 26 | */ 27 | public class TwitterTimelineUpdatesSample { 28 | 29 | @Test 30 | public void runDemo() throws Exception { 31 | new ClassPathXmlApplicationContext("META-INF/spring/integration/TwitterTimelineUpdates-context.xml"); 32 | 33 | Thread.sleep(20000); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /basic/xmpp/src/test/java/org/springframework/integration/samples/xmpp/ReceiveInstantMessageSample.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.integration.samples.xmpp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.context.support.ClassPathXmlApplicationContext; 22 | 23 | /** 24 | * @author Oleg Zhurakousky 25 | * 26 | */ 27 | public class ReceiveInstantMessageSample { 28 | 29 | @Test 30 | public void runDemo() throws Exception { 31 | new ClassPathXmlApplicationContext("META-INF/spring/integration/ReceiveInstantMessageSample-context.xml"); 32 | 33 | Thread.sleep(20000 * 10); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /applications/cafe-scripted/README.md: -------------------------------------------------------------------------------- 1 | Cafe Demo - Scripted Implementation 2 | =================================== 3 | 4 | This is the scripted implementation of the classic **cafe** sample application. You can choose among **groovy**, **ruby**, and **python** scripting languages. The functionality is basically identical in all cases to the original cafe demo. 5 | 6 | # Instructions for running the CafeDemo sample 7 | 8 | The script language is passed as a command line argument. This may be run directly from Gradle: 9 | 10 | $ gradlew :cafe-scripted:runCafeDemoApp -Plang=[language] 11 | 12 | ## Groovy Control Bus 13 | 14 | This sample also demonstrates the use of Spring Integration's **groovy control bus** which accepts Groovy scripts as control messages. These scripts may invoke lifecycle operations on adapters or operations on managed beans. 15 | 16 | To demonstrate the control bus, while the CafeDemoApp is running, execute in a separate window: 17 | 18 | $ gradlew :cafe-scripted:runControlBus 19 | 20 | This will use groovy scripts to 21 | 22 | * Query the waiter for the total number of orders delivered 23 | * If the total orders > 3, stop the inbound adaptor on the cafe (the order flow). The Cafe application will continue to run, but eventually the output will stop when all pending orders have completed. 24 | 25 | 26 | --------------------------------------------------------------------------------