This is a simple application, which implements a domain-centric "Hexagonal" approach and demonstrates Microservice Architecture Pattern using Spring Boot.
We try to implement a simple list of topics for our internal java club.
Currently, we use Google Java Style
It is checked during Maven validate
phase using maven-checkstyle-plugin
Manually check your code style using Maven:
mvn checkstyle:check
Build fails, if your code doesn't correspond to Google Java Style.
For IntelliJ IDEA there is a plugin CheckStyle-IDEA.
It contains a bundled configuration Google Checks
, which you should select for this project in preferences.
In one single repo need to implement next items:
A final result of phase0 must be like this:
TBD
mvn clean install
cd src/main/docker
docker-compose up
What happens:
Navigate to http://localhost:8080/test and enter credentials:
after this you will be redirected to request response.
docker-compose down
Get all active and inactive users
http -a lohika_user@gmail.com:password123 GET http://localhost:8080/users
Get users by active
http -a lohika_user@gmail.com:password123 GET http://localhost:8080/users?active={true|false}
Get paged users. By default, page = 0 and size = 100
http -a lohika_user@gmail.com:password123 GET http://localhost:8080/users?page={page}&size={size}
Get a user by id
http -a lohika_user@gmail.com:password123 GET http://localhost:8080/users/{userId}
Create an active user
http -a lohika_user@gmail.com:password123 POST http://localhost:8080/users firstName=Maxim lastName=Sashkin email=max@email.com password=pass123 role=admin
Update a user
http -a lohika_user@gmail.com:password123 PUT http://localhost:8080/users/{userId} firstName=MaximUpdated
Delete a user
http -a lohika_user@gmail.com:password123 DELETE http://localhost:8080/users/{userId}
Activate a user
http -a lohika_user@gmail.com:password123 PUT http://localhost:8080/users/activate/{userId}
Deactivate a user
http -a lohika_user@gmail.com:password123 PUT http://localhost:8080/users/deactivate/{userId}