Code Monkey home page Code Monkey logo

transfer-rest's Introduction

REST API using SparkJava + Google Guice (Inject and Repository) + HSQLDB + Hibernate

This is a simple financial business Rest API implemented using SparkJava + Google Guice (Inject and Repository) + HSQLDB + Hibernate.

Libraries and Tools

How it works

This demo implements a simple financial business Rest API. It has a simple data model of an Account with an One-to-Many relationship to Transaction. Through Rest API you are able to request for any CRUD operation. Because of the Transactional annotation provided by Google Guice Repository all the CRUD operations are ACID-enabled. All the data will be stored in an In-Memory HSQLDB database named transferRestDB.

How to run

By simply executing TransferRESTApp class, the application starts listening on localhost:8080 with the following API:

  • GET /health: health-check

  • GET /accounts: get all the accounts

  • GET /accounts/:id: get a single account

  • POST /accounts: save an account

  • PUT /accounts: update an account

  • DELETE /accounts/:id: delete an account

  • GET /accounts/:id/transactions: get transactions of an account

  • GET /accounts/:id/transactions/:tid: get a single transaction of an account

  • POST /accounts/:id/transactions: save a transaction of an account

  • PUT /accounts/:id/transactions: update a transaction of an account

  • DELETE /accounts/:id/transactions/:tid: delete a transaction of an account

transfer-rest's People

Contributors

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