This is a Spring Boot project for managing members, invitations, and authentication with JWT.
It supports two database profiles for flexibility in development:
- H2 (in-memory, default) → quick, resets on restart
- MySQL (via Docker) → persistent, closer to production
H2 requires no setup and is enabled by default.
mvn spring-boot:runor (with wrapper):
./mvnw spring-boot:run- H2 Console: http://localhost:8080/h2-console
- JDBC URL:
jdbc:h2:mem:testdb
From the project root:
docker compose up -d- MySQL →
localhost:3307 - Adminer (DB UI) → http://localhost:8081
Login to Adminer with:
- System: MySQL
- Server: mysql (container name) or
localhost - Username:
yucomp - Password:
yucomp123 - Database:
yucompdb
mvn spring-boot:run -Dspring-boot.run.profiles=mysqlor:
./mvnw spring-boot:run -Dspring-boot.run.profiles=mysqlWhen finished, stop the containers:
docker compose down- This stops services but keeps data in the
mysql_datavolume. - To also wipe all data:
docker compose down -v- Use H2 when iterating quickly (e.g., developing or running tests).
- Switch to MySQL to verify persistence and compatibility with a production-like DB.
- Port conflict: If
3307or8081are in use, editdocker-compose.ymlto change ports. - Invalid login in Adminer: Double-check credentials in
docker-compose.ymlmatch theapplication-mysql.yml. - Stale containers: Run
docker compose down -vto remove old volumes and reset.