Practicing database connection with JPA in the Spring Boot framework.
Overview This project demonstrates how to manage a MySQL and PostgreSQL database using Docker containers while integrating them with Spring Boot and JPA.
Database Structure
How to Run the Containers To start the MySQL and PostgreSQL databases using Docker, follow these steps:
Clone the repository
git clone https://github.com/copo12d/jpa-practice.gitEnsure Docker is running
Run the containers
docker-compose up -dThis will start both MySQL and PostgreSQL containers with persistent storage.
Check running containers
docker ps
or
docker ps -a
Stop the containers (when needed)
docker-compose downRunning the Spring Boot Application After starting the containers, run your Spring Boot app with:
./mvnw spring-boot:runor
mvn spring-boot:run