
// domain/model/Money.java public record Money(double amount, String currency)
In traditional layered architecture: Web → Service → Repository → Database
Driving Adapter (REST) → Incoming Port (Interface) → Application Service → Outgoing Port (Interface) ← Driven Adapter (JPA)
// application/service/CreateProductService.java package com.example.application.service; import com.example.application.port.in.CreateProductUseCase; import com.example.domain.model.Money; import com.example.domain.model.Product; import com.example.domain.spi.ProductRepository; import lombok.RequiredArgsConstructor;