Generated Modules
Every module contains a full src/ scaffold
(src/main/java, src/main/resources, src/test/java, src/test/resources)
with a package-info.java in each module’s primary leaf package under
src/main/java only — never src/test/java, since Java rejects two
package-info.java files compiled for the same package. (acceptance-tests is the
exception worth calling out: its real test content — the *AT classes — lives under
src/test/java, but its lone package-info, under src/main/java, still describes
"Functional acceptance tests for the application.")
Every module that the app composes also carries a Spring @Configuration class in a
.config sub-package; the app module’s Application class `@Import`s them all (each
referenced by simple name via its own import statement) so the whole tree assembles into
a single Spring context.
Module Naming
Throughout this page each module is referred to by its directory name (e.g. common-domain).
A module’s Maven artifactId is the project artifactId, followed by -, followed by that
directory name. For a project generated with artifactId=my-service, the common-domain
module’s artifactId is my-service-common-domain, and the aggregator/BOM under parent/
is my-service-parent. Every module inherits its groupId and version from parent/.
This prefix applies to `artifactId`s only — the directory names and Java package names listed
below are unaffected.
Several modules also carry a Maven <name>/<description> derived from the appName prompt
(see appName-Derived Naming).
appName-Derived Naming
appName (e.g. Order Service) drives the <name>/<description> of these modules. The
area name is folded into named service areas' service-{name}/domain-service-{name}
naming (trailing for <name>, mid-sentence for prose); other modules use appName as-is.
| Module | <name> |
<description> |
|---|---|---|
parent/ |
${appName} Parent |
${appName}'s parent POM. |
common-testing |
${appName} Common Testing |
${appName}'s common testing. |
domain-{type} (REST) |
${appName} Domain REST |
${appName}'s REST presentation tier domain classes. |
domain-{type} (GraphQL) |
${appName} Domain GraphQL |
${appName}'s GraphQL presentation tier domain classes. |
presentation-graphql |
${appName} Presentation GraphQL |
${appName}'s GraphQL presentation tier. |
domain-service[-{name}] |
${appName} Domain Service[ {Area}] |
${appName}'s[ {area}] service tier domain classes. |
service[-{name}] |
${appName} Service[ {Area}] |
${appName}'s[ {area}] service tier (business logic). |
app |
${appName} App |
${appName}'s application configuration including building its deployment assembly. |
acceptance-tests |
${appName} Acceptance Tests |
${appName}'s acceptance tests. |
common-domain, presentation-rest, and the per-integration modules (domain-{type}-{name},
integration-{type}-{name}) have no dedicated appName-derived <name>/description yet and
keep their existing generic description text.
spring.application.name in app’s `application.properties uses appName’s generated-property
form (spaces removed, lowercased), e.g. `orderservice.
Fixed Modules
These modules are always generated regardless of input.
common-domain- Domain classes shared across all other modules. No dependencies on other generated modules.
Package:
{base.package}.common.domain common-testing- Shared test infrastructure.
Package:
{base.package}.common.testing
Depends on:common-domainand every other domain module (domain-{type}-{name},domain-service/domain-service-{name},domain-{type}presentation domain modules). No domain module depends back oncommon-testing— onlyservice/service-{name}does — so this stays acyclic.
Spring (includeSpring=true):spring-boot-starter-testat compile scope; additionallyspring-boot-starter-graphql-testat compile scope when agraphqlpresentation is present. CarriesRestAcceptanceTestBase(when arestpresentation is present) and/orGraphQlAcceptanceTestBase(when agraphqlpresentation is present) — shared@SpringBootTest(webEnvironment = RANDOM_PORT)base classes thatacceptance-tests’ `AppRestAcceptanceTestBase/AppGraphQlAcceptanceTestBaseextend. serviceorservice-{name}- Business logic for a service area (see the
serviceAreasprompt).Package:
{base.package}.serviceor{base.package}.service.{name}
Depends on:common-domain, its owndomain-service/domain-service-{name}module, and the integration module(s) it consumes — a named area takes the integration sharing its name, while the single defaultservicetakes every integration module; ifincludeSpring=true, alsocommon-testing(test scope) domain-serviceordomain-service-{name}- Domain classes owned by a service area — one per
service/service-{name}module.Package:
{base.package}.domain.serviceor{base.package}.domain.service.{name}
Depends on:common-domain; ifincludeSpring=true, alsospring-boot-starter-validation(no domain module depends oncommon-testing) app- Application assembly — produces the runnable artifact (e.g. Spring Boot über-jar). If
includeSpring=true,appis always a monitorable web service regardless ofpresentationTypes— it adds the corespring-boot-starter,spring-boot-starter-webmvc,spring-boot-starter-actuator, andspring-boot-admin-starter-client(actuator needs a web server to expose its endpoints), and always generates anAppServletInitializer(WAR deployment) class; adatabaseintegration additionally addsspring-boot-starter-data-jpaand@EnableTransactionManagement. Contains the Spring BootApplication(@SpringBootApplication) class in{base.package}.app.config. Also createsapplication.properties(actuator, Spring Boot Admin registration, logging defaults, plus JPA and SQL logging when adatabaseintegration is present) and six empty per-environment files (application-{ci,dev,local,prod,qa,uat}.properties) insrc/main/resources.Package:
{base.package}.app,{base.package}.app.config
Depends on: all non-test modules (common-domain, all domain and integration modules, all service modules and theirdomain-servicemodules, all presentation modules) acceptance-tests- Functional acceptance tests that exercise the application from the outside.
Package:
{base.package}.at
Depends on:app,common-domain, alldomain-{type}-{name}integration domain modules, alldomain-service/domain-service-{name}service-area domain modules, alldomain-{type}presentation domain modules (all labeled "this app" in the pom); alsocommon-testing(test scope) unconditionally, and — ifincludeSpring=trueand adatabaseintegration is present —datasource-proxy-spring-boot-starter(SQL logging), plusspring-graphql-test(test scope) when agraphqlpresentation is present
Plugin:maven-failsafe-plugin(integration-test+verifygoals)
Spring (includeSpring=true): generates{appNameClass}AcceptanceTestConfiguration(package{base.package}.at.config) andsrc/test/resources/logback-spring.xml; generatesAppRestAcceptanceTestBase(package{base.package}.at, extendscommon-testing’s `RestAcceptanceTestBase) when arestpresentation is present, and/orAppGraphQlAcceptanceTestBase(extendsGraphQlAcceptanceTestBase) when agraphqlpresentation is present — both@ContextConfiguration’d with the AT configuration class plus every generated module’s `@Configurationclass (reachable transitively via theappdependency), and excludingDataSourceAutoConfiguration/XADataSourceAutoConfigurationonly when adatabaseintegration is present.
Integration Modules
Generated per type:name pair in the integrations prompt.
The database type is abbreviated to db in all names.
domain-{type}-{name}- Domain classes for a specific integration (e.g.
domain-db-users,domain-rest-orders).Package:
{base.package}.domain.{type}.{name}
Depends on:common-domain integration-{type}-{name}- Integration implementation classes — DAOs, Spring Data JPA repositories, REST clients, etc.
(e.g.
integration-db-users,integration-rest-orders).Package:
{base.package}.integration.{type}.{name}
Depends on:common-domain,domain-{type}-{name}; ifincludeSpring=trueand the type isdatabase, alsodatasource-proxy-spring-boot-starter(SQL logging)
Plugin:maven-failsafe-plugin(integration-test+verifygoals)
Presentation Modules
Generated per type in the presentationTypes prompt.
domain-{type}- Domain classes for a presentation tier (e.g.
domain-rest,domain-graphql) — these map to/from the service-tier domain objects ("the service domain deps").Package:
{base.package}.domain.{type}
Depends on:common-domain, everydomain-service/domain-service-{name}module; ifincludeSpring=true, alsospring-boot-starter-validation presentation-{type}- Request-handling classes — controllers, resolvers, etc.
(e.g.
presentation-rest,presentation-graphql).Package:
{base.package}.presentation.{type}
Depends on:common-domain,domain-{type}, and all service modules
Parent POM
parent/pom.xml is the aggregator and BOM for all sibling modules.
There is no pom.xml at the project root — parent/ is a sibling of all other modules.
It contains:
<parent>— inheritsspring-boot-starter-parent(4.1.0) via an empty<relativePath/>, supplying Spring dependency management and plugin defaults<packaging>pom</packaging><name>/<description>derived fromappName(see appName-Derived Naming)<modules>— all sibling modules referenced as../modulerelative paths, sorted alphabetically<dependencyManagement>— every module pinned to${project.version}, split into a TEST section (acceptance-testsandcommon-testing, at<scope>test</scope>) and a PROD section (all other modules, plus managed third-party dependencies such asspring-core,datasource-proxy-spring-boot-starter, andspring-boot-admin-starter-client— the latter two pinned via their own version properties since they aren’t part of the Spring Boot BOM)- Common properties: Java 21 via
maven.compiler.release; UTF-8 source encoding <pluginManagement>— pinned versions formaven-compiler-plugin,maven-failsafe-plugin,maven-jar-plugin(withskipIfEmpty=true),maven-surefire-plugin,modernizer-maven-plugin(bound toverify,javaVersion=${java.version}), andversions-maven-plugin(rule set ignores alpha/beta/milestone/RC versions)<plugins>— activatesmodernizer-maven-pluginso every module is checked for outdated API usage duringverify
To build a generated project:
cd my-service/parent
mvn verifyUse mvn install instead if other local projects need to consume the generated modules from your local Maven repository.
Updating dependency and plugin versions
parent/ also contains two convenience scripts that wrap mvn versions:update-properties,
bumping every dependency and plugin version property in parent/pom.xml to its latest stable
release in a single command:
| Script | Platform |
|---|---|
mvn-update-properties-versions.sh |
Linux / macOS |
mvn-update-properties-versions.ps1 |
Windows (PowerShell) |
Run the applicable script from parent/ immediately after generating the project to pick up
the newest versions before your first build:
cd my-service/parent
./mvn-update-properties-versions.shThe full plugin output is written to parent/target/version-updates-applied.log.
Pre-release versions (alpha, beta, milestone, RC) are skipped by the versions-maven-plugin
rule set, so only stable releases are applied.
Package Reference
All type and name segments in package names are lowercased.
| Module | Package |
|---|---|
common-domain |
{base.package}.common.domain |
common-testing |
{base.package}.common.testing |
domain-{type}-{name} |
{base.package}.domain.{type}.{name} |
integration-{type}-{name} |
{base.package}.integration.{type}.{name} |
service |
{base.package}.service |
service-{name} |
{base.package}.service.{name} |
domain-service |
{base.package}.domain.service |
domain-service-{name} |
{base.package}.domain.service.{name} |
domain-{type} |
{base.package}.domain.{type} |
presentation-{type} |
{base.package}.presentation.{type} |
app |
{base.package}.app |
acceptance-tests |
{base.package}.at |

