1. Pet Shop Application - Run Spring Boot (main run config)
2. Database - Start database containers
3. Reset Database - Clean volumes and restart (Maven-based, auto-stops)
All use IntelliJ Docker/Spring Boot/Maven integration (Windows/Mac/Linux).
Reset Database uses exec-maven-plugin to run docker compose down -v.
Stops automatically when complete.
- Add spring-boot-starter-test dependency for JUnit Jupiter
- Validate main class exists and matches run config reference
- Validate module name matches pom.xml artifactId
- Validate schema.sql contains active column
- Prevents configuration breakage from refactoring
- Fails with clear messages pointing to which configs need updates
All 5 tests passing.
- Check for 'users' table existence instead of just mysqladmin ping
- Ensures schema.sql has executed before marking as healthy
- Add 40s start_period for initial schema load
- Prevents Spring Boot from connecting to uninitialized database
- FIXED: ChatService now uses customer.customerId instead of users.id for CUSTOMER role
- getConversations(): Resolve Customer entity to get customerId for filtering
- getConversation(): Verify ownership using customer.customerId
- sendMessage(): Updated signature to accept role parameter for staff assignment logic
- getMessages(): Verify conversation ownership using customer.customerId
- ChatController: Updated sendMessage call to pass user.getRole()
This fixes the domain bug where conversation.customerId (references customer table)
was being incorrectly populated with users.id instead of customer.customerId.
Phase 3B
- Add customerId to SaleRequest DTO
- Update SaleService to use AuthenticationHelper for employee attribution
- Populate sale.customer when customerId provided in request
- Fix AdoptionController to use authenticated customer instead of hardcoded ID 1
- Fix AppointmentController to use authenticated customer instead of hardcoded ID 1
- Fix RefundController to use authenticated customer instead of hardcoded ID 1
- Update data.sql sales to include customer linkage for refund testing
- Update Postman collection sale creation with customerId and items