This application will return maximum of 5 books and maximum of 5 albums that are related to the input term. The response elements will only contain title, authors(/artists) and information whether a book or an album.
Java 11
Maven 3.6.x
Docker
You can build using Docker like the example
docker build -f Multi-Stage.Dockerfile -t <image-name> .
Or you can build using Maven like the example
mvn clean complie
docker build -t <image-name> .
You can run as a simple jar like the example
java -jar target/*.jar
Or start the container image
docker run -p 8080:8080 <image-name>
mvn test
If you want to change the return threshold for services, you can change the environment variable MAX_RESULTS or pass via parameter -DMAX_RESULTS=10
All metrics are exposed in endpoint /actuator/metrics
Application health can be checked at endpoint /actuator/health
curl --location --request GET "localhost:8080/all?term=Eminem"
- OpenJDK - Free and open-source implementation of the Java Platform
- Maven - Dependency Management
- Spring Boot - The web framework used
- Actuator - It adds several production grade services to application
- Micrometer - Provides a simple facade over the instrumentation clients
- Lombok - Avoid this verbosity so common in Java code
- Apache Commons BeanUtils - Provides an easy-to-use but flexible wrapper around reflection and introspection
- Docker - Tool designed to make it easier to create, deploy, and run applications by using containers