Skip to content

Backend REST API for the Senior Hub project with Spring Boot, Docker and MySQL

License

Notifications You must be signed in to change notification settings

ericafenyo/senior-hub-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Senior Hub API

This is a Spring Boot project serving as the backend for my Senior Hub Application

API Documentation

Visit this page for a complete API documentation with example responses.

The documentation is still in progress in the test.md file. I will add it to this Readme file once it's complete.

Building and Testing

Prerequisite

  • Java 17
  • Docker and Docker Compose.

Clone the repository and navigate to the project directory:

git clone [repository_url]
cd senior-hub-api

Install Dependencies:

./mvnw clean install

Start both the database and SMTP server using Docker Compose:

docker-compose up

Run the Application:

java -jar target/seniorhub-0.0.1-SNAPSHOT.jar

Configuration

The application's configuration properties are stored in the application.properties file.

Certain data, such as user roles and permissions, are automatically stored in the database using Liquibase. After launching the application, you can disable this functionality by setting the following property in the application.properties file:

spring.liquibase.enabled=false

This property disables Liquibase upon application startup.

Exceptions during startup

If you encounter an exception during startup, it could be because the database tables aren't prepared before Liquibase performs the database migrations.

To resolve the issue, begin by disabling Liquibase and starting the application:

spring.liquibase.enabled=false

This allows Hibernate to create the necessary tables. Once the tables are created, re-enable Liquibase to execute the migrations. Afterward, restart the application. This sequence of steps should address the problem.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Backend REST API for the Senior Hub project with Spring Boot, Docker and MySQL

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published