Skip to content

RESTful API with JWT & Swagger. Built with Spring Boot, JPA, Spring Security, PostgreSQL and dockerized.

Notifications You must be signed in to change notification settings

jeanpierm/rest-api-spring-jpa

Repository files navigation

RESTful API Spring Boot

Spring Boot + JPA

Technologies used

  • Java 11
  • Spring Boot (Spring Web)
  • Spring Security (stateless with JWT and roles)
  • JPA (hibernate)
  • Javax Validations to validate the properties of the entities in the requests.
  • PostgreSQL 14 + pgAdmin (with docker)
  • OpenAPI 3 springdoc
  • ModelMapper (for mapping dtos to jpa entities easily)

Run PostgreSQL + pgAdmin with Docker

# up containers
$ docker-compose up -d postgres pgadmin

# down containers
$ docker-compose down

Microservice (Dockerization)

docker build -t jeanp0/rest-api-spring-boot .

Run a postgres, pgadmin and spring-app images with docker-compose. The spring-app image is built automatically if it doesn't exist.

# up containers
$ docker-compose up -d

# down containers
$ docker-compose down

# view logs
$ docker-compose logs -f

Captures

Application running with Docker via docker-compose

Application running with Docker

Swagger UI

Swagger UI

Schemas by OpenAPI 3

Schemas by OpenAPI 3

Success login

Success login

Fail login

Fail login

GET with token expired

GET with token expired

GET without token

GET without token

GET with valid token

GET with valid token

Refresh token

Refresh token

Releases

No releases published

Packages

No packages published