Intended to be annotated on the root marker class of a (Maven) module which contains a single coherent set of functionality, possibly including domain services.

A Module (because it’s a meta-annotation) is also a Spring Configuration @Configuration , which means that the functionality can be depended upon transitively using Spring’s Import @Import annotation. Normally the import graph mirrors the dependencies in Maven.

Also, a Module also declares the Spring ComponentScan @ComponentScan (with no parameters), which means that any domain services in the same package or subpackages are automatically found and registered.


@interface Module {