Skip to content

sotobotero/spring_boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Person CRUD API with Dozer Mapper

Powered by @sotobotero Sotobotero.com

🌟 Contribuye y Mejora este Proyecto ¡Este proyecto está en constante evolución y cualquier mejora es bienvenida! 🎉 Si encuentras algo que se pueda optimizar, tienes una idea o quieres corregir errores, no dudes en participar.

📌¿Quieres enviar cambios y no sabes cómo?📌

Consulta el paso a paso Cómo contribuir con un proyecto en github para español or How to Contribute with github project for English.

License

This project is open source under the Licencia MIT.

Descripción

This project is a REST API example built with Spring Boot that demonstrates CRUD operations for managing person data. The application uses Dozer Mapper to efficiently map between domain objects and DTOs, maintaining a clean architecture.

Features

  • Complete CRUD operations for person data
  • REST API with best practices implementation
  • Object mapping with Dozer Mapper
  • Clean, scalable architecture for Spring Boot learners

Requirements

  • Java 8+
  • Maven

Setup

  1. Clone the repository:
git clone https://github.com/sotobotero/spring_boot.git
  1. Navigate to the project directory:
cd spring_boot
  1. Build and run the application:
mvn clean install
mvn spring-boot:run

API Usage

Endpoints

  • GET /person - Retrieve all persons

    curl -X GET http://localhost:8080/person
  • GET /person/{id} - Retrieve a specific person

    curl -X GET http://localhost:8080/person/{id}
  • POST /person - Create a new person

    curl -X POST http://localhost:8080/person -H "Content-Type: application/json" -d '{
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com"
    }'
  • PUT /person/{id} - Update an existing person

    curl -X PUT http://localhost:8080/person/{id} -H "Content-Type: application/json" -d '{
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com"
    }'
  • DELETE /person/{id} - Delete a person

    curl -X DELETE http://localhost:8080/person/{id}

Request Example

POST /person

{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com"
}

About

REST API CRUD built with Spring Boot and DozerMapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages