A simple REST API with Spring Framework
[x] End-points, HTTP methods
[x] Spring Data JPA
[x] Bean Validation
[x] Cache
[x] API security
[x] Monitoring
[x] Profiles
[x] Tests
[x] Deploy (via Docker and Heroku)
At first, you have to input your email and password to receive your token, so you can make some priviliged requests!!
An example of a privileged request:
In case you don't have a privileged access, you'll see the following message:
The forum topics have pagination and cache settings
$ git clone https://github.com/ev1illyn/forum-spring-rest-api.git
/forum-spring-rest-api$ mvn -DskipTests=true clean package
/forum-spring-rest-api$ sudo docker build -t img-alura/forum .
/forum-spring-rest-api$ sudo docker images
/forum-spring-rest-api$ sudo docker run -d -p 8080:8080 -e SPRING_PROFILES_ACTIVE=prod -e FORUM_DATABASE_URL=jdbc:h2:mem:alura-forum -e FORUM_DATABASE_USERNAME=sa -e FORUM_DATABASE_PASSWORD= -e FORUM_JWT_SECRET=123456 img-alura/forum
For further reference, please consider the following sections:
The following guides illustrate how to use some features concretely: