This project provides a small Spring Boot library for managing books stored in MongoDB. It targets Spring Boot 3 and Java 21.
Add this project as a dependency to gain the Book model, repository and REST controller. Configure a MongoDB instance (default mongodb://localhost:27017/bookdb) via application.properties.
Use Maven to build the library:
mvn packageMaven may need proxy settings to resolve dependencies. This repository provides
.mvn/settings.xml configured for a proxy at proxy:8080; use it with
mvn -s .mvn/settings.xml if required. The same settings are used by the
Dockerfile and Jenkinsfile so that builds succeed without additional
configuration.
Tests run with an embedded Spring context and do not require MongoDB.
To try the library as a standalone application with MongoDB, use Docker Compose:
docker compose up --buildThe container image is built using the provided Dockerfile and listens on
port 8080.