Description
While trying to setup spring-modulith on an existing project that has already multiple modules, each one designed to used hexagonal architecture, I realized that spring-modulith does not support hexagonal architecture.
I think that by allowing spring-modulith modules detection to be more customizable, by providing additional extension points like strategies for identifying NamedInterfaces from a module base package, it should be possible to support this architecture, and others.
I made a rough experiment here:
Note that it would require to open API to create NamedInterfaces and NamedInterface.
Additionally, it would probably be useful to provide a lookup strategy to identify shared modules, when it's possible to automatically detect them, and avoid manual declarations through @Modulithic
attribute.