Skip to content

eduardofranca1/spring-rest-api-crud-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring REST API CRUD Example

Technologies

Features

  • User CRUD
  • DTO (Data Transfer Object)
  • Docker
  • Tests
    • Controller
    • Service
    • Repository

How to run the project

Follow this steps to run the project

  1. mvn clean install

    • to build the project and download all maven dependencies
  2. mvn spring-boot:run

    • to start the server
  3. mvn test

    • to run the tests

Run Docker

To run docker, execute the commands below:

  1. Execute the command to compile the project and generate .jar file

    • mvn clean package
  2. Use the Docker command to create a Docker image

    • docker build -t [name] .

      • t: Name and tag for the docker image
      • . : The context for the build process
  3. Run the container

    • docker run -p 8080 'your-application-name'
  4. Test the application