Backend Application Default Plugin

Generates a full backend application using the provided 'layout' property

Sample configuration:

config {
basePackage "com.example"
persistence jpa
databaseType postgresql
layout CleanHexagonalProjectLayout
// The IDE will automatically use the active .zdl file
// Alternatively, specify the path here to maintain separation between models and plugins
zdlFile "models/example.zdl"
plugins {
BackendApplicationDefaultPlugin {
useLombok true
--force // overwrite all files
}
}
}

Visit https://www.zenwave360.io/docs/zenwave-sdk/backend-application for complete documentation.

Options

OptionDescriptionTypeDefaultValues
layoutProject organization and package structure (documentation)ProjectLayoutDefaultProjectLayoutDefaultProjectLayout, CleanHexagonalProjectLayout, LayeredProjectLayout, SimpleDomainProjectLayout, HexagonalProjectLayout, CleanArchitectureProjectLayout
zdlFileZDL file to parseString
zdlFilesZDL files to parse (comma separated)List
basePackageJava Models package nameStringio.example.domain.model
persistencePersistencePersistenceTypemongodbmongodb, jpa
databaseTypeSQL database flavorDatabaseTypepostgresqlgeneric, postgresql, mysql, mariadb, oracle
styleProgramming StyleProgrammingStyleimperativeimperative, reactive
useLombokUse @Getter and @Setter annotations from Lombokbooleanfalse
useSpringModulithWhether to use Spring Modulith annotations and featuresbooleanfalse
addRelationshipsByIdControls whether to add a read/write relationship by id when mapping relationships between aggregate (not recommended) keeping the relationship by object readonly.booleanfalse
idJavaTypeSpecifies the Java data type for the ID fields of entities. Defaults to Long for JPA and String for MongoDB if not explicitly set.String
includeEmitEventsImplementationWhether to add AsyncAPI/ApplicationEventPublisher as service dependencies. Depends on the naming convention of zenwave-asyncapi plugin to work.booleantrue
targetFolderTarget folder to generate code to. If left empty, it will print to stdout.File
continueOnZdlErrorContinue even when ZDL contains fatal errorsbooleantrue
formatterCode formatter implementationFormatterspalantirpalantir, spring, google
skipFormattingSkip java sources output formattingbooleanfalse
haltOnFailFormattingHalt on formatting errorsbooleantrue

Getting Help

jbang zw -p io.zenwave360.sdk.plugins.BackendApplicationDefaultPlugin --help