Basic autometrics integration in spring boot application (https://github.com/LeudiX/Simple-Books-API-with-Spring-Boot)
A simple API for books management with persistence, basic CRUD operations and security, simple centralized error handling mechanism.
Implementing autometrics from https://github.com/jamsiedaly/autometricsj
- Open VSCode
- Install Java, Maven and Spring packs extensions
- Reload VScode and configure it for Maven
- Run (mvn clean install) for dependencies management
- If no problems, type (mvn sprin-gboot: run) cmd to run the app
- Open the browser on localhost:8081
- Enjoy watching my wonderful stuff!!!
- List all books
curl --location 'localhost:8081/api/v1/books'
-
Create a book curl --location 'localhost:8081/api/v1/books'
--header 'Content-Type: application/json'
--data '{ "title":"Book3", "author": "Author3" }' -
Delete a book
curl --location --request DELETE 'localhost:8081/api/v1/books/{bookID}'
- Find a book by title
curl --location 'localhost:8081/api/v1/books/title/{BookTitle}'
GET localhost:8081/api/v1/books
POST localhost:8081/api/v1/books