Code Monkey home page Code Monkey logo

sprintegration's Introduction

Sprintegration

Sample application for Tinkoff Java Meetup (May 17, 2018) to showcase some basic concepts of Spring Integration framework and its Java DSL.

Brief Description

The application is built upon Spring Boot and Spring Integration frameworks. As a test business case it performs the following actions:

  • queries for new posts in Spring Engineering blog (Atom feed) by schedule and then, for every fetched blog post:
  • extracts the most mentioned Spring project name (e.g. Boot, Cloud, Framework);
  • searches Twitter for tweets about extracted Spring project for last week;
  • converts every tweet into simple (reduced) model;
  • for original (non-retweeted) tweets:
  • for retweets:
    • converts tweet reduced model into JSON;
    • chooses a filename basing on extracted Spring project name (e.g. boot.txt, cloud.txt);
    • saves retweets to the chosen file in work/retweets directory in appending mode.

Tips & Tricks

  • H2 web console is available at http://localhost:8080/h2-console. Use the following credentials to login:
    JDBC URL: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=false
    User name: sa
    No password (leave empty)
  • There are 5 commits in repository that correspond to main steps described above. The application is fully runnable on every one of them. Each commit is tagged with Step_x tag, where x is from 1 to 5.
  • The repository includes Twitter cosumer key and secret to facilitate tweets searching on behalf of Sprintegration application. These credentials are issued under Toparvion Twitter account and granted with read-only access. You may use them to play with the sample as-is. But please do provide your own credentials if you develop your own application basing on this sample. Registering a new application in Twitter (and acquiring its key and secret) is very easy: https://apps.twitter.com/app/new. The credentials provided here may be revoked at any time without preliminary notification.

Build & Run

System Requirements

  • JDK 9 or higher
  • Git

First, clone the repository. Then navigate to the cloned repository dir and execute:

To build
gradlew build
To run
gradlew bootRun

or (after successful build)

java -jar build\libs\sprintegration-0.0.1-SNAPSHOT.jar

License

MIT. See LICENSE

sprintegration's People

Contributors

toparvion avatar

Watchers

 avatar  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.