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..fd0a38f --- /dev/null +++ b/compose.yaml @@ -0,0 +1,20 @@ +# 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 + 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: 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 new file mode 100644 index 0000000..207aa47 --- /dev/null +++ b/src/main/resources/data-local.sql @@ -0,0 +1,21 @@ +-- 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 + (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');