Skip to content

CandyyPL/spring-boot-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot REST API

This is a simple REST API application made in Spring Boot.

It uses REST Controllers to handle HTTP requests and provide a web interface for the application, which were used intentionally for learning purposes.

Application uses PostgreSQL running on Docker as main database and H2 Memory Database for tests.

Project Structure

The project implements a full web layer consisting of Controllers, Services, and DTOs (Data Transfer Objects) for Author and Book entities.

  • Controllers: Located in src/main/java/com.candyy.postgres/controllers, handling HTTP endpoints.
  • Services: Located in src/main/java/com.candyy.postgres/services, containing business logic.
  • DTOs: Located in src/main/java/com.candyy.postgres/domain/dto, used for data mapping between layers.
  • Mappers: Located in src/main/java/com.candyy.postgres/mappers, facilitating conversion between Entities and DTOs.

Tests

The application includes comprehensive integration tests for all REST endpoints to ensure correct CRUD functionality over HTTP.

Tests are placed in src/test/java/com.candyy.postgres/controllers directory.

The test suite covers:

  • Creation and full/partial updates of resources.
  • Retrieval of single resources and paginated lists.
  • Deletion of resources.
  • Verification of HTTP status codes and JSON response bodies.

Dependencies

Project uses Spring Web, Spring Data JPA, ModelMapper, PostgreSQL, and Lombok.

About

A simple REST API application made in Spring Boot with Maven.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages