Just wanted to hear opinions on this kind of project structure in java for one DDD project:
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)
Where would be appropriate to put main methods. I suppose infrastructure-messaging and infrastructure-rest would be natural fit?