chore(deps): update SpringUserFramework to 4.0.2#49
Conversation
Update the ds-spring-user-framework dependency from 4.0.1 to 4.0.2 and add Docker Compose support for local development. - Bump ds-spring-user-framework from 4.0.1 to 4.0.2 - Bump Spring Boot from 4.0.1 to 4.0.2 - Bump Selenide from 7.13.0 to 7.14.0 - Add spring-boot-docker-compose for local development - Add compose.yaml with MariaDB service for local development
Add SQL script with sample event data to populate the database during local development and testing. - 15 sample events spanning 2025-2027 - Uses INSERT IGNORE to prevent duplicates on re-run
Pull Request ReviewI've reviewed PR #49 and have the following feedback: ✅ Positives
|
There was a problem hiding this comment.
Pull request overview
This pull request updates several dependencies and adds local development infrastructure to the Spring User Framework demo application. The main changes include upgrading the Spring User Framework and Spring Boot to version 4.0.2, updating Selenide test framework, and introducing Docker Compose support with sample event data for easier local development setup.
Changes:
- Dependency updates: Spring Boot (4.0.1 → 4.0.2), Spring User Framework (4.0.1 → 4.0.2), and Selenide (7.13.0 → 7.14.0)
- New Docker Compose configuration for simplified local MariaDB setup
- Sample event data SQL file for local development testing
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| build.gradle | Updated Spring Boot, Spring User Framework, and Selenide versions; added Docker Compose development dependency |
| compose.yaml | New Docker Compose configuration for local MariaDB database setup |
| src/main/resources/data-local.sql | Added 15 sample events for local development testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| (1, 'Tech Conference 2025', 'A conference about the latest in tech.', 'San Francisco, CA', '2025-06-15', '10:00:00'), | ||
| (2, 'Spring Boot Workshop', 'Learn Spring Boot from experts.', 'New York, NY', '2025-07-10', '14:00:00'), |
There was a problem hiding this comment.
The Event entity has a @FutureOrPresent validation constraint on the date field (see Event.java line 34), which requires dates to be today or in the future. The events with 2025 dates (rows 1-2) will fail this validation when the data is loaded, potentially causing the application startup to fail or these records to be rejected. Update these dates to be in 2026 or later to comply with the validation constraint.
| (1, 'Tech Conference 2025', 'A conference about the latest in tech.', 'San Francisco, CA', '2025-06-15', '10:00:00'), | |
| (2, 'Spring Boot Workshop', 'Learn Spring Boot from experts.', 'New York, NY', '2025-07-10', '14:00:00'), | |
| (1, 'Tech Conference 2025', 'A conference about the latest in tech.', 'San Francisco, CA', '2026-06-15', '10:00:00'), | |
| (2, 'Spring Boot Workshop', 'Learn Spring Boot from experts.', 'New York, NY', '2026-07-10', '14:00:00'), |
| environment: | ||
| MARIADB_DATABASE: springuser | ||
| MARIADB_USER: springuser | ||
| MARIADB_PASSWORD: springuser | ||
| MARIADB_ROOT_PASSWORD: rootpassword |
There was a problem hiding this comment.
The compose.yaml uses MARIADB_* environment variables while the existing docker-compose.yml uses MYSQL_* environment variables (lines 9-13). Both MariaDB images support both naming conventions, but for consistency with the existing docker-compose.yml in this repository, consider using the MYSQL_* variable names instead. This makes it easier to maintain both files and reduces confusion.
| @@ -0,0 +1,15 @@ | |||
| services: | |||
| mariadb: | |||
| image: mariadb:11.6 | |||
There was a problem hiding this comment.
The MariaDB image version in this new compose.yaml file is '11.6', while the existing docker-compose.yml file uses '11.6.2' (a more specific patch version). For consistency and to ensure reproducible builds, consider using the same specific version tag '11.6.2' instead of the major.minor version '11.6'. This prevents unexpected updates when the image is pulled.
| mariadb: | ||
| image: mariadb:11.6 | ||
| environment: | ||
| MARIADB_DATABASE: springuser | ||
| MARIADB_USER: springuser | ||
| MARIADB_PASSWORD: springuser | ||
| MARIADB_ROOT_PASSWORD: rootpassword | ||
| ports: | ||
| - "3306:3306" | ||
| volumes: | ||
| - mariadb-data:/var/lib/mysql |
There was a problem hiding this comment.
The new compose.yaml file lacks health checks that are present in the existing docker-compose.yml (lines 16-22). Health checks are important for ensuring the database is fully initialized before the application attempts to connect. Consider adding a healthcheck configuration similar to the existing docker-compose.yml to improve reliability during startup.
- Remove @FutureOrPresent validation from Event entity to allow historical events and ensure sample data loads regardless of date - Add security warning to compose.yaml clarifying credentials are for local development only - Add MariaDB-specific syntax note to data-local.sql
Pull Request ReviewThank you for this PR! Overall, this is a solid dependency update and developer experience improvement. Here's my detailed feedback: ✅ Strengths
🔍 Issues & Concerns1. CRITICAL: Breaking Change in Event Validation (src/main/java/com/digitalsanctuary/spring/demo/event/Event.java:32-33)Issue: Removed - @FutureOrPresent(message = "Event date must be today or in the future")
private LocalDate date;Impact:
Recommendation:
2. SQL Data Initialization Not Configured (src/main/resources/data-local.sql)Issue: Created Missing Configuration: Add to spring:
sql:
init:
mode: always # or 'embedded' for H2 only
platform: localImpact: The sample data file won't be loaded automatically, making it appear non-functional to developers. Recommendation: Either:
3. Docker Compose Configuration (compose.yaml:8-13)Security Observation: While the warning comment is present, consider these improvements for environment variable overrides and add health checks for better reliability. Additional Considerations:
4. Sample Data Quality Issues (src/main/resources/data-local.sql)Issues:
Recommendations:
📋 Test CoverageCurrent Status: ✅ All 116 tests passing Missing Test Coverage:
Recommendation: Add a test case to verify the new validation behavior with past dates. 🎯 Action ItemsBefore Merge:
Nice to Have:
Overall AssessmentCode Quality: ✅ Good Recommendation: Request changes to address the critical validation removal and SQL initialization configuration before merging. Review generated by Claude Code following Spring User Framework conventions |
Summary
Test plan
./gradlew bootRundocker compose up