Volevo solo avere opinioni su questo tipo di struttura del progetto in Java per un progetto DDD:
com.some.namespace
application
services = (app services that talk to repositories and domain model)
validators = (validators for DTOs in app service layer)
domain
events = (domain events)
exceptions = (exceptions in domain - eg. during validation or business logic)
factories = (used to construct domain model objects - eg. construct from DTOs)
model = (full domain model with all entities, value objects etc.)
repositories = (interfaces only - implemented in infrastruct.)
services = (domain service interfaces only - implemented in infrastr.)
infrastructure
messaging = (message listeners - eg RabbitMQ - talks to app services)
repositories = (repository implementations)
sql = (one version of repository implementation)
rest = (rest endpoints - talks to application services)
services = (domain service implementations)
Dove sarebbe opportuno mettere i metodi principali. Suppongo che la messaggistica delle infrastrutture e il resto dell'infrastruttura siano naturali?