Coder Social home page Coder Social logo

sobhan-sai / elasticsearch-spring-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivanvs/elasticsearch-spring-demo

0.0 2.0 0.0 15 KB

Application demonstrate how to create small Spring application that is listening on Twitter public stream. Application persist tweets in MySQL and ElasticSearch databases.

License: MIT License

Java 88.80% JavaScript 5.32% HTML 5.88%

elasticsearch-spring-demo's Introduction

elasticsearch-spring-demo

Application demonstrate how to create small Spring application that is listening on Twitter public stream. Application persist tweets in MySQL and ElasticSearch databases and enables user to search tweets from MySQL and ElasticSearch.

About

This application was created as demo included in presentation.

What You Need To Install?

How To Setup Twitter

In order to be able to read tweets from Twitter API you need to create application on Twitter. Tutorial how can you create Twitter application you can find on this link.

When you have created Twitter application in resource file you need to replace next fields with keys from your application:

  • spring.social.twitter.appId
  • spring.social.twitter.appSecret
  • spring.social.twitter.accessToken
  • spring.social.twitter.accessTokenSecret

MySQL Setup

Paramaters for connecting to MySQL database can be found in resource file:

  • spring.datasource.url
  • spring.datasource.username
  • spring.datasource.password

As you can see from default configuration, in MySQL you have to create database scheme es_demo.

ElasticSearch Setup

You should setup your ElasticSearch instance to have cluster name: web_app_demo

How To Build Application

In order to build application you need to download javascript resources. This can be done with bower by running command in root folder:

bower install

How To Start Application

In order to start application you need to run maven command in root folder of application:

mvn spring-boot:run

Databases

If you for some reason don't want to install MySQL and ElasticSearch on your machine, you can use supplied docker-compose configuration file.

What You Need To Install?

How To Start Containers?

In order to start MySQL container and ElasticSearch container this need to be done:

  • Open terminal in docker folder of this project
  • Start docker-compose with command: docker-compose up or sudo docker-compose up

Pay attention that this two containers expect ports 3306, 9200 and 9300 to be free.

License

elasticsearch-spring-demo is released under MIT License.

elasticsearch-spring-demo's People

Contributors

ivanvs avatar

Watchers

James Cloos 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.