项目作者: miklosbarabas

项目描述 :
Payments DEMO
高级语言: Java
项目地址: git://github.com/miklosbarabas/payments-demo.git
创建时间: 2018-06-25T22:24:46Z
项目社区:https://github.com/miklosbarabas/payments-demo

开源协议:MIT License

下载


Payments-demo

This project was developed to demonstrate a service that will provide REST endpoints
to Fetch/Create/Update/Delete payment resources and persist their state. (e.g. to a database)

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Depending on how you want to build/run the application (methods below) you might need to have docker & docker-compose installed.
The application itself is using Java 8, so you need to have a JDK installed of that version to build/run without Docker.
If you have chosen the Docker/Docker Compose method, you will not need to install anything as it is handled by Docker.

Building and running

  1. Clone or download the repository

  2. Build & Run

    At the root of the project:

    • Without Docker/Docker Compose

      • Build
        1. mvn clean package
      • Run

        1. java -jar target/demo.jar

        or

        1. mvn spring-boot:run

        This will only run the application itself, without any external service or middleware

    • With Docker/Docker Compose
      1. docker-compose up
      or if you want to rebuild the docker image:
      1. docker-compose up --build
      This method is using Docker’s MultiStage build which creates an intermediary container with the build dependencies
      to build the artifact which is than copied to the run-container and a Docker image is created out of it.
      This way you do not have to install anything besides Docker and Docker Compose does that for you inside containers.

Endpoints

(* For demonstration purposes. Can be disabled for production deployments!)

Tests

Automated integration tests are using an embedded MongoDB and sample data (payments.json). These should pass when building the artifact.

Built with

Author

Miklos Barabas - GitHub