From 623baa17de88faa2962020a9b156eb21a72fbeeb Mon Sep 17 00:00:00 2001 From: Devon Hillard Date: Sun, 25 Jan 2026 15:20:22 -0700 Subject: [PATCH 1/3] chore(deps): update SpringUserFramework to 4.0.2 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 --- build.gradle | 9 ++++++--- compose.yaml | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 compose.yaml diff --git a/build.gradle b/build.gradle index 7a759ec..3a842d9 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version '4.0.1' + id 'org.springframework.boot' version '4.0.2' id 'io.spring.dependency-management' version '1.1.7' id "com.github.ben-manes.versions" version "0.53.0" @@ -39,7 +39,7 @@ repositories { dependencies { // DigitalSanctuary Spring User Framework - implementation 'com.digitalsanctuary:ds-spring-user-framework:4.0.1' + implementation 'com.digitalsanctuary:ds-spring-user-framework:4.0.2' // Spring Boot starters implementation 'org.springframework.boot:spring-boot-starter-actuator' @@ -63,6 +63,9 @@ dependencies { runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.5.7' runtimeOnly 'org.postgresql:postgresql' + // Docker Compose support for local development + developmentOnly 'org.springframework.boot:spring-boot-docker-compose' + // Utility libraries implementation 'org.passay:passay:1.6.6' implementation 'com.google.guava:guava:33.5.0-jre' @@ -83,7 +86,7 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-security-test' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'com.h2database:h2:2.4.240' - testImplementation 'com.codeborne:selenide:7.13.0' + testImplementation 'com.codeborne:selenide:7.14.0' testImplementation 'io.github.bonigarcia:webdrivermanager:6.3.3' // OAuth2 Testing dependencies diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..a55d9f2 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,15 @@ +services: + 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 + +volumes: + mariadb-data: From a489a7431b5b79b9fd99a238f9437e6b0a0394f6 Mon Sep 17 00:00:00 2001 From: Devon Hillard Date: Sun, 25 Jan 2026 15:22:31 -0700 Subject: [PATCH 2/3] chore: add sample event data 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 --- src/main/resources/data-local.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/resources/data-local.sql diff --git a/src/main/resources/data-local.sql b/src/main/resources/data-local.sql new file mode 100644 index 0000000..4fa481d --- /dev/null +++ b/src/main/resources/data-local.sql @@ -0,0 +1,20 @@ +-- Test data for local development +-- Uses INSERT IGNORE to skip if data already exists + +INSERT IGNORE INTO events (id, name, description, location, date, time) +VALUES + (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'), + (3, 'AI Symposium', 'Exploring the advancements in AI.', 'Los Angeles, CA', '2026-08-22', '09:30:00'), + (4, 'DevOps Summit', 'Best practices for CI/CD pipelines, infrastructure as code, and cloud-native deployments.', 'Seattle, WA', '2026-03-18', '09:00:00'), + (5, 'Kubernetes Deep Dive', 'Hands-on workshop covering advanced Kubernetes patterns and operators.', 'Austin, TX', '2026-04-05', '13:00:00'), + (6, 'Java 25 Launch Party', 'Celebrating the release of Java 25 with demos and networking.', 'Denver, CO', '2026-05-12', '18:00:00'), + (7, 'Security in the Cloud', 'Zero-trust architecture, secrets management, and compliance automation.', 'Boston, MA', '2026-06-20', '10:30:00'), + (8, 'Microservices Architecture Forum', 'Patterns for building resilient distributed systems at scale.', 'Chicago, IL', '2026-07-08', '11:00:00'), + (9, 'Open Source Contributor Day', 'Learn how to contribute to popular open source projects with guided mentorship.', 'Portland, OR', '2026-09-14', '09:00:00'), + (10, 'Database Performance Tuning', 'Query optimization, indexing strategies, and monitoring for SQL and NoSQL databases.', 'Atlanta, GA', '2026-10-03', '14:00:00'), + (11, 'Frontend Frameworks Showdown', 'Comparing React, Vue, Angular, and Svelte with live coding demos.', 'Miami, FL', '2026-11-15', '10:00:00'), + (12, 'API Design Masterclass', 'RESTful best practices, GraphQL patterns, and API versioning strategies.', 'Philadelphia, PA', '2027-01-22', '13:30:00'), + (13, 'Machine Learning in Production', 'MLOps practices for deploying and monitoring ML models at scale.', 'San Diego, CA', '2027-02-28', '09:00:00'), + (14, 'Startup Tech Meetup', 'Networking event for tech founders and engineers building the next big thing.', 'Nashville, TN', '2027-03-10', '17:30:00'), + (15, 'Women in Tech Summit', 'Inspiring talks and workshops celebrating women in the technology industry.', 'Washington, DC', '2027-04-25', '08:30:00'); From 638adde10806ef68f68fc1568e23a784b2a5e077 Mon Sep 17 00:00:00 2001 From: Devon Hillard Date: Sun, 25 Jan 2026 15:32:15 -0700 Subject: [PATCH 3/3] fix: address PR #49 feedback for sample data and documentation - 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 --- compose.yaml | 5 +++++ .../java/com/digitalsanctuary/spring/demo/event/Event.java | 2 -- src/main/resources/data-local.sql | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/compose.yaml b/compose.yaml index a55d9f2..fd0a38f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,3 +1,8 @@ +# Local Development Database Configuration +# WARNING: These credentials are for LOCAL DEVELOPMENT ONLY. +# Production deployments MUST use secure credentials managed through +# environment variables or secrets management systems. + services: mariadb: image: mariadb:11.6 diff --git a/src/main/java/com/digitalsanctuary/spring/demo/event/Event.java b/src/main/java/com/digitalsanctuary/spring/demo/event/Event.java index 602b9e0..31cc0e5 100644 --- a/src/main/java/com/digitalsanctuary/spring/demo/event/Event.java +++ b/src/main/java/com/digitalsanctuary/spring/demo/event/Event.java @@ -10,7 +10,6 @@ import jakarta.persistence.Table; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.FutureOrPresent; import lombok.Data; @Data @@ -31,7 +30,6 @@ public class Event { private String location; @NotNull(message = "Event date is required") - @FutureOrPresent(message = "Event date must be today or in the future") private LocalDate date; @NotNull(message = "Event time is required") diff --git a/src/main/resources/data-local.sql b/src/main/resources/data-local.sql index 4fa481d..207aa47 100644 --- a/src/main/resources/data-local.sql +++ b/src/main/resources/data-local.sql @@ -1,5 +1,6 @@ --- Test data for local development --- Uses INSERT IGNORE to skip if data already exists +-- Test data for local development (MariaDB) +-- Note: Uses INSERT IGNORE syntax specific to MySQL/MariaDB +-- For PostgreSQL, use INSERT ... ON CONFLICT DO NOTHING instead INSERT IGNORE INTO events (id, name, description, location, date, time) VALUES