Giter Site home page Giter Site logo

i-code-java-conf-2016's Introduction

i-code-java-conf-2016

This project has 4 modules:

  1. Standard: in this module, we showcase the standard usage of Spring Data JPA. All the good stuff that it brings forward for the Spring users. The project itself is built with Spring boot. There is data.sql under resources with preload some information into H2, the in-memory database used for this project. Per default, it runs on port 8080. Below are the different endpoints:

    • localhost:8080/customers
    • localhost:8080/customers/by?firstName=Steven&lastName=Ndaye
    • localhost:8080/customers/status?lastName=Ndaye&statuses=GOOD_STANDING,DEBT
  2. Specification: in this module we showcase how Specification API enhances Spring Data JPA by giving us a better way to query data. The project uses employees database loaded within mysql database. Where do I get it from? Go to this github repo: https://github.com/datacharmer/test_db It has all the instructions on how to install this large dataset. Per default, it runs on port 8082. Below are the different endpoints:

    • localhost:8082/employees/by?bornFrom=1957-01-01&bornTo=1960-01-01&hiredFrom=1980-01-01&hiredTo=1990-01-01
    • localhost:8082/employees (NB. Use this with caution, it will load the entire employees data set)
    • localhost:8082/employees/female?bornBefore=1962-01-01
    • localhost:8082/employees/male?hiredAfter=1990-01-01
    • localhost:8082/employees/employee?firstName=Gino&lastName=Usery&bornBefore=1960-01-01&hiredAfter=1990-01-01
  3. Query dsl: in this module we showcase how QueryDSL framework enables the construction of statically typed SQL-like queries via its fluent API. This project uses Sakila database. It comes loaded within mysql if you had installed it with its sample database. In case you do not have it, check this github repo: https://github.com/datacharmer/test_db/tree/master/sakila Per default, it runs on port 8081. Below are the different endpoints:

    • localhost:8081/customers/stores?id=1
    • localhost:8081/customers/by?status=ACTIVE
    • localhost:8081/customers/by?status=INACTIVE
    • localhost:8081/customers/predicate?firstName=ALFREDO
    • localhost:8081/customers/predicate?storeId=1&active=1
  4. Stream: This solution is probably controversial but hey see how you can improve it. Basically we stream all the database data into a stream and apply some queries. It uses the employees database mentioned up there. Per default, it runs on 8083. And below are the different endpoints:

    • localhost:8083/employees
    • localhost:8083/employees/by?gender=M
    • localhost:8083/employees/filter?bornFrom=1958-01-01&bornTo=1961-01-01

The typical way of running these maven projects:

mvn clean compile
mvn package
mvn spring-boot:run

Run these commands under every module.

Voila!

Make a pull request if you have changes to make.

i-code-java-conf-2016's People

Contributors

stevenndaye avatar

Stargazers

csyangchsh avatar Juntao Qiu avatar

Watchers

James Cloos avatar  avatar

Forkers

barnelisme

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.