Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1.22 KB

README.md

File metadata and controls

44 lines (26 loc) · 1.22 KB

OpenClassroom Fullstack P03 - Implement a REST API with Spring Boot

Project Overview

This API is designed to manage rentals with functionalities for CRUD operations utilizing Java, Spring Boot and MySQL.

It is designed to provide datas to an Angular web application which is available on this github repo

Requirements

  • Java 17+
  • Maven
  • MySQL for database setup

Setup

  1. Clone the repository.

  2. setup your secret key in env variable ${RENTAL_SECRET_KEY}

  3. Install dependencies with Maven:

mvn install
  1. Create an empty database in MySQL, and grant a user the necessary rights to access and use that database.

  2. Configure the following env variables:

  • ${RENTAL_DB_NAME}: the name of the configured database
  • ${RENTAL_DB_USERNAME}: the username of the created database user
  • ${RENTAL_DB_PASSWORD}: the password of the created database user
  1. Initialize the database using Spring JPA by running the local server:
mvn spring-boot:run

API Documentation

Access Swagger after starting the server at localhost:9000/api/swagger-ui.html