Skip to content

digital-delivery-academy/srm-springboot-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srm-template

Build Status Codacy Badge Codacy Coverage Report

srm-template Shows a basic implementation of a springboot micro-service that can be used as a foundation for creating other micro-services

Contents

Getting Started

Prerequisites

  • Java 1.10
  • Maven
  • SpringBoot

Installation

Generic

  1. git clone git@github.com:digital-delivery-academy/srm-springboot-template.git
  2. mvn clean package
  3. Runjava -jar "/target/template-0.0.1-SNAPSHOT.jar" to launch the server

In IntelliJ

  1. Clone master and run mvn clean install in its directory
  2. Import project into IntelliJ
  3. Enable Maven auto-import
  4. Create new SpringBoot configuration
  5. Set Main Class to io.lampada.TemplateApplication
  6. Press Run to launch server

Running Tests

Terminal
  • Run command mvn clean install
In IntelliJ
  1. Create new JUnit Configuration
  2. Set Test Kind to All in Package
  3. Set Search for Tests to In Whole Package
  4. Run configuration

Deployment

  1. Run mvn clean install on project
  2. Runjava -jar "/target/template-0.0.1-SNAPSHOT.jar" to launch the server

A server should deploy to the port set in Application.Properties

Usage

Endpoints

Template Endpoints

GET  /          #Get all example entities stored in the microservice in JSON
GET  /12        #Get example by ID in JSON (12 in this example)
GET  /health    #Returns health-checks, i.e. JSON {"status":"UP"} and status 200 OK
POST /          #Post a new example entity (look at #Schema for more information)

Schema

Template Payloads

POST Example JSON payload

{
  "exampleId" : 12
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages