*If you would like to support these tutorials, you can contribute to my Patreon account
This application provides speech management features:
- View all their speeches saved in the system.
- Add a speech to the system (for this challenge we will consider a speech to have the actual text, the author information, keywords about the speech and a speech date).
- Edit a speech or its metadata
- Delete a speech
- Share a speech with someone else via email
- The ability to search the speeches – (search by author, date range, subject area, or snippets of text from the speech body.
This project exposes REST API running on top of Spring Boot 2 framework. It integrates Mapstruct library for entity-dto conversion and Lombok for automatic getter/setter generation.
To run the application, simply clone this project and execute the command below in the terminal inside the project's root directory.
mvn spring-boot:run
The application should be running on port 8080 by default.
Before building the docker container, make sure to build the project first by running mvn install.
To run the application and PostgreSQL in docker, open a command prompt and go to the project's root directory.
docker-compose up
The integration tests are created using Mockito and can be run via maven (development-h2 profile must be use):
mvn clean test -P development-h2
A Postman collection is also available in the test/postman folder. To run it, development profile must be use and a PostgreSQL database must be configured.
- DatabaseName=legalsight
- Username=dev
- Password=dev
The test "Share speech will fail" as it requires a valid email account in the application.properties.