Skip to content

ibercode/spring-boot-restful-service

 
 

Repository files navigation

CircleCI

spring-boot-restful-service

Spring Boot Java 11 RESTful service with aggregation and date relationship in the domain model. Following DTO architecture pattern and MVC with a service layer. A simple order/customer API with C.R.U.D operations. This repo is focusing mainly on different REST test api frameworks and Spring test annotations. Spring Docs are being used for API documentation.

  • @WebMVCTest
  • @DataMongoTest
  • @SpringBootTest
  • REST-assured
  • Testcontainers

OpenAPI docs

When running the application of course :P

Environment stuffs

Testcontainers

  • Docker installation is required.
  • The testcontainers.properties file must be modifed with the flag testcontainers.reuse.enable=true on your local machine.

Run the "dev" environment

If you have a local installation or something running on port 27017 just make the application-dev.properties file point at your local mongodb or change the docker-compose.dev files port number. Else do this

  • Start the mongo container docker-compose -f docker-compose.dev.yml up -d
  • Start the application with 'dev' spring profile active.

Run the "prod" environment

  • Build the .jar file mvn clean package
  • Build the docker image. docker build -t mangilaspringbootrestfulservice .
  • Start docker compose docker-compose up -d
  • The poor man's production environment should be up and running :P

About

Spring Boot RESTful service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.9%
  • Dockerfile 0.1%