Skip to content

feat: implement darvest-landing-service scaffolding with controllers, services, and repositories

Kayouh Salaheddine a demandé de fusionner feat/landing-service-scaffolding vers develop

This Merge Request initializes the core architectural layers of the darvest-landing-service. It transforms the service from an empty shell into a functional Spring Boot microservice, ready to interact with the darvest-common library.

Key Changes

  1. Core Application & Configuration
  • Application Entry Point: Populated Application.java with a standard @SpringBootApplication and enabled JPA Auditing, Caching, and Component Scanning.
  • Infrastructure Scanning: Added @EntityScan and @EnableJpaRepositories to ensure entities and repositories from the darvest-common library are correctly discovered.
  • Environment Configuration: Updated application.yml with the service port (5057), cache configurations (Ehcache), and multipart file handling.
  1. API & Service Layer Implementation
  • LandingController: Implemented REST endpoints for fetching aggregated landing page data (/api/landing/data) and handling waitlist registrations (/api/landing/waitlist).
  • LandingService: Created a service layer that consolidates multiple data sources (Properties, FAQs, Features, and Platform Statistics) into a single optimized response DTO.
  • Data Mapping: Integrated ModelMapper to handle the conversion between JPA entities and Response DTOs, ensuring the internal data model is isolated from the API.
  1. Persistence Layer
  • Repositories: Created JPA Repository interfaces for all landing page components:
    • PropertyRepository
    • FAQRepository
    • WaitlistEntryRepository
    • FeatureRepository
    • PlatformStatRepository

Technical Notes

  • Dependency Management: Fixed initial build errors related to missing classes and duplicate test dependencies in the pom.xml.
  • Integration: All entities extend AbstractAuditingEntity as per the project standards to ensure consistent tracking of creation and modification timestamps.

How to Test

  1. Run ./mvnw clean compile to verify there are no compilation errors.
  2. The service is ready to be started once a valid DataSource (PostgreSQL/H2) is configured in the local environment properties.

Rapports de requête de fusion