55
66Every module contains a full `src/` scaffold
77(`src/main/java` , `src/main/resources` , `src/test/java` , `src/test/resources` )
8- and a `package-info.java` in every applicable leaf package directory.
8+ with a `package-info.java` in each module's primary leaf package under both
9+ `src/main/java` and `src/test/java` .
10+
11+ Every module that the `app` composes also carries a Spring `@Configuration` class in a
12+ `.config` sub-package; the `app` module's `Application` class `@Import` s them all so the
13+ whole tree assembles into a single Spring context.
914
1015== Fixed Modules
1116
@@ -17,7 +22,7 @@ Domain classes shared across all other modules. No dependencies on other generat
1722_Package_: `{base.package}.common.domain`
1823
1924`common-testing`::
20- Shared test utilities. Has no test-scope Java packages .
25+ Shared test infrastructure .
2126+
2227_Package_: `{base.package}.common.testing` +
2328_Depends on_: `common-domain`
@@ -26,21 +31,30 @@ _Depends on_: `common-domain`
2631Business logic for a service area (see the `serviceAreas` prompt).
2732+
2833_Package_: `{base.package}.service` or `{base.package}.service.{name}` +
34+ _Depends on_: `common-domain`, its own `domain-service` / `domain-service-{name}` module
35+
36+ `domain-service` _or_ `domain-service-{name}`::
37+ Domain classes owned by a service area — one per `service` / `service-{name}` module.
38+ +
39+ _Package_: `{base.package}.domain.service` or `{base.package}.domain.service.{name}` +
2940_Depends on_: `common-domain`
3041
3142`app`::
3243Application assembly — produces the runnable artifact (e.g. Spring Boot über-jar).
44+ Contains the Spring Boot `Application` (`@SpringBootApplication`) and `AppServletInitializer`
45+ (WAR deployment) classes in `{base.package}.app.config`, and adds the
46+ `spring-boot-starter-web` and `spring-boot-starter-jdbc` dependencies.
3347+
34- _Package_: `{base.package}.app` +
48+ _Package_: `{base.package}.app`, `{base.package}.app.config` +
3549_Depends on_: all non-test modules (`common-domain`, all domain and integration modules,
36- all service modules, all presentation modules)
50+ all service modules and their `domain-service` modules , all presentation modules)
3751
3852`acceptance-tests`::
3953Functional acceptance tests that exercise the application from the outside.
40- Has no main-scope Java packages.
4154+
4255_Package_: `{base.package}.at` +
4356_Depends on_: `app`, `common-domain`, all `domain-{type}-{name}` integration domain modules,
57+ all `domain-service` / `domain-service-{name}` service-area domain modules,
4458all `domain-{type}` presentation domain modules +
4559_Plugin_: `maven-failsafe-plugin` (`integration-test` + `verify` goals)
4660
@@ -148,6 +162,8 @@ All type and name segments in package names are lowercased.
148162|`integration-{type}-{name}` |`{base.package}.integration.{type}.{name}`
149163|`service` |`{base.package}.service`
150164|`service-{name}` |`{base.package}.service.{name}`
165+ |`domain-service` |`{base.package}.domain.service`
166+ |`domain-service-{name}` |`{base.package}.domain.service.{name}`
151167|`domain-{type}` |`{base.package}.domain.{type}`
152168|`presentation-{type}` |`{base.package}.presentation.{type}`
153169|`app` |`{base.package}.app`
0 commit comments