record CreateProductCommand(String name, double price, String currency) {} }
private Product toDomain(ProductJpaEntity entity) ... designing hexagonal architecture with java pdf
@RequiredArgsConstructor public class CreateProductService implements CreateProductUseCase private final ProductRepository productRepository; // depends on outgoing port record CreateProductCommand(String name
// application/port/in/CreateProductUseCase.java (Incoming Port) package com.example.application.port.in; import com.example.domain.model.Product; public interface CreateProductUseCase { Product execute(CreateProductCommand command); designing hexagonal architecture with java pdf