Giter VIP home page Giter VIP logo

spring-cloud-task-webinar's Introduction

Spring Cloud Task Webinar

Dependencies and configuration

Configuration required for this sample:

  • An FTP server (I used the embedded one available on OS X to run the demo locally)

  • Redis running locally

  • In the spring-cloud-task-ftp project an application.properties with the following configuration (empty values should be configured to your environment):

logging.level.org.springframework.integration=DEBUG
logging.level.org.springframework.cloud.task=DEBUG
logging.level.org.springframework.cloud.stream=DEBUG
spring.main.web-environment=false
spring.application.name=ftp
spring.datasource.driverClassName=
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
spring.datasource.platform=
spring.datasource.continueOnError=false
spring.cloud.stream.bindings.output.destination=task-requests
io.spring.cloud.task.ftp.host=
io.spring.cloud.task.ftp.port=
io.spring.cloud.task.ftp.username=
io.spring.cloud.task.ftp.password=
  • In the spring-cloud-task-import project an application.properties with the following configuration (empty values should be configured to your environment):

spring.datasource.driverClassName=
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
spring.datasource.platform=
spring.application.name=importJob
logging.level.org.springframework.cloud.task=DEBUG
spring.datasource.continueOnError=true
spring.batch.job.enabled=false

For this project, the pom.xml files are configured to use MySql. If you use another database, you’ll need to update the pom.xml files to use the appropriate driver as well as provide a schema-*.sql in spring-cloud-task-import/src/main/resources for the customer table.

Running the project

To build the project, from the root directory:

$ mvn clean install

Once that has completed, confirm that your source and destination directories for the file ftp exist ( '/' on the remote server and /tmp/inbound/ on the local server). The data file used in the demo is found in spring-cloud-task-import/src/main/resources/data.

To run the project:

  • Start the sink by executing: $ java -jar spring-cloud-task-sink/target/sink-0.0.1-SNAPSHOT.jar

  • Once the sink is running, kick off the ftp process via $ java -jar spring-cloud-task-ftp/target/ftp-0.0.1-SNAPSHOT.jar

  • The results should be that 69500 records end up in the customer table and and 8 tasks have been executed in the task_execution table.

spring-cloud-task-webinar's People

Contributors

mminella avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.