Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ososuna/to-do-rest-v2

Refactor for to do rest API
https://github.com/ososuna/to-do-rest-v2

java rest-api spring spring-security

Last synced: 3 days ago
JSON representation

Refactor for to do rest API

Awesome Lists containing this project

README

        

# To Do API

## Contributors

| [![Oswaldo Osuna](https://avatars.githubusercontent.com/u/76191288?s=100&u=5969faa01ef7b1315a701c3e209b3deaa5b5528a&v=4)
Oswaldo Osuna](https://ososuna.dev)
🐈‍⬛ ☕️ 🤠 | [![Ivan Mendoza](https://avatars.githubusercontent.com/u/22760520?v=4&s=100)
Ivan Mendoza](https://github.com/ivansmb11)
🍺 🤓 💻 |
| :---: | :---: |

## Requirements

For building and running the application you need:

- [JDK 11.0](https://www.oracle.com/mx/java/technologies/javase/jdk11-archive-downloads.html)
- [Maven 3](https://maven.apache.org)

## Running the application locally

There are several ways to run a Spring Boot application on your local machine. One way is to execute the `main` method in the `com.todo.todoapi.TodoApiApplication` class from your IDE.

Alternatively you can use the [Spring Boot Maven plugin](https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-maven-plugin.html) like so:

```shell
mvn spring-boot:run
```

## Try it out with Docker

First, build the application:

```shell
mvn package
```

Then you need to build the Docker image:

```shell
docker build -t to-do-api-v2 .
```

Now you can run the image:

```shell
docker run --name to-do-api-v2 -p 3001:3001 to-do-api-v2
```

## Run jacoco to check coverage in unit testing
```shell
mvn clean org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent
```

## Class Diagram