Skip to content

davidatkinsuk/simple-account-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Account Service

Overview

This is a simple REST service for adding, deleting and listing accounts.

The service can be ran using

mvn spring-boot:run

You can then invoke the service using the path http://localhost:8080/rest/account/json. For example:

curl -v http://localhost:8080/rest/account/json    

Spring Boot is used to bootstrap the Jersey based JAX-RS service. Alternatively, i'd consider using Camel with its built in REST support (with or without Spring Boot)

Unit tests are provided for the in memory repository, and integration tests are provided for the end to end service. To keep things simple, both run in the maven 'test' phase, i.e. to run all tests run

mvn clean test

For more substantial projects i'd consider using a BDD approach (e.g. Gherkin/Cucumber JVM) to express the functional/integration tests. I'd also consider creating a swagger doc first and using that to generate the JAXRS interface and model classes

Lombok is used to automatically generate getters and setters and builder. This reduces boiler plate code.

Intellij

If using Intellij, first install the Lombok Plugin and enable Annotation Processors. See this Stack Overflow page for more information.

About

Simple REST Account Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages