ddf-common is a multi-module foundational component library for Spring Boot 3. It consolidates shared backend capabilities, web infrastructure integration, and common middleware or third-party integrations.
It is not a runnable business application template. It is intended to be a reusable, composable, and evolving library set. The repository provides both low-level modules and business-facing starters so different services can assemble only what they need.
- Java 17
- Spring Boot 3.5.9
- Maven 3.9.6+
- Build a Spring Boot 3 oriented multi-module shared foundation
- Reduce adoption cost through starters and auto-configuration
- Cover shared capabilities, infrastructure integrations, and scenario-oriented packaging
- Standardize the repository for Maven Central publication and long-term evolution
ddf-common-apiddf-common-coreddf-common-mvcddf-common-authenticationddf-common-limit
ddf-common-redisddf-common-distributed-lockddf-common-data-mysql-starterddf-common-governance-starterddf-common-log4jddf-common-shardingddf-common-zookeeperddf-common-mongoddf-common-es
ddf-common-alarmddf-common-captchaddf-common-ids-serviceddf-common-rocketmqddf-common-onsddf-common-mqttddf-common-mqtt-clientddf-common-websocketddf-common-netty-brokerddf-common-third-partyddf-common-s3ddf-common-vpsddf-common-xxl-executorddf-common-canalddf-common-script
ddf-common-dependencyddf-common-starter-webddf-common-starter-default
| Module | Description |
|---|---|
ddf-common-api |
Shared constants, context models, validation contracts, common enums, base interfaces, and reusable DTO conventions. |
ddf-common-core |
Core utilities, cache and crypto support, global properties, event models, and foundational supporting components. |
ddf-common-mvc |
MVC auto-configuration, unified response wrapping, global exception handling, filters, access logs, and web foundation support. |
ddf-common-authentication |
Authentication filters, token validation extension points, authentication properties, and login-state cache integration. |
ddf-common-limit |
Rate limiting and repeat-submission protection, including annotations, aspects, key generators, and related configuration. |
| Module | Description |
|---|---|
ddf-common-redis |
Redis and Redisson auto-configuration, cache manager support, local cache support, and Redis helper utilities. |
ddf-common-distributed-lock |
Distributed lock implementations based on Redis and Zookeeper. |
ddf-common-log4j |
Log4j2 logging integration support. |
ddf-common-data-mysql-starter |
Aggregates JDBC, MySQL, and Druid as the MySQL data-access starter. |
ddf-common-governance-starter |
Aggregates Mail, Actuator, and Prometheus registry support as the entry point for governance, alerting, and observability capabilities. |
ddf-common-sharding |
Sharding auto-configuration and rule packaging. |
ddf-common-zookeeper |
Zookeeper listeners, monitoring support, and related helpers. |
ddf-common-mongo |
MongoDB auto-configuration and MongoTemplate helper utilities. |
ddf-common-es |
Elasticsearch dependency integration module. |
| Module | Description |
|---|---|
ddf-common-alarm |
Alerting for exceptions, logs, and rule-driven scenarios, including DingTalk and Lark notification integrations. |
ddf-common-captcha |
Image captcha and behavior captcha integration support. |
ddf-common-ids-service |
Distributed ID generation configuration, API contracts, and implementations. |
ddf-common-rocketmq |
RocketMQ enhancement layer for message wrapping, environment isolation, and producer support. |
ddf-common-ons |
Alibaba Cloud ONS integration and listener container support. |
ddf-common-mqtt |
Core MQTT client connectivity, publishing support, and related connection settings. |
ddf-common-mqtt-client |
Higher-level topic and message model abstractions on top of ddf-common-mqtt. |
ddf-common-websocket |
WebSocket configuration, handshake support, message handling, and related business support points. |
ddf-common-netty-broker |
Netty-based broker or message proxy samples and foundational implementation. |
ddf-common-third-party |
Third-party integration utilities, currently focused on Alibaba Cloud OSS and SMS support. |
ddf-common-s3 |
Object storage abstractions compatible with the S3 protocol. |
ddf-common-vps |
File and image processing support. |
ddf-common-xxl-executor |
XXL-Job executor module and baseline configuration. |
ddf-common-canal |
Canal subscription message dispatch support. |
ddf-common-script |
Internal scripts and offline utility code. |
| Module | Description |
|---|---|
ddf-common-dependency |
Centralized dependency version management suitable for BOM import. |
ddf-common-starter-web |
Aggregates common web foundation modules as the starting point for lightweight web services. |
ddf-common-starter-default |
Aggregates web, MySQL, governance, and other baseline capabilities for standard business services. |
Suitable when:
- Only web foundation support is needed
- No database integration is needed yet
- No governance integration is needed yet
<dependency>
<groupId>io.github.dongfangding</groupId>
<artifactId>ddf-common-starter-web</artifactId>
<version>${ddf-common.version}</version>
</dependency>Suitable when:
- Building a regular backend business service
- Web, MySQL, Druid, and governance capabilities are all needed
<dependency>
<groupId>io.github.dongfangding</groupId>
<artifactId>ddf-common-starter-default</artifactId>
<version>${ddf-common.version}</version>
</dependency>If you do not want to use starter-default, you can combine modules by scenario:
<dependency>
<groupId>io.github.dongfangding</groupId>
<artifactId>ddf-common-starter-web</artifactId>
<version>${ddf-common.version}</version>
</dependency>
<dependency>
<groupId>io.github.dongfangding</groupId>
<artifactId>ddf-common-data-mysql-starter</artifactId>
<version>${ddf-common.version}</version>
</dependency>
<dependency>
<groupId>io.github.dongfangding</groupId>
<artifactId>ddf-common-governance-starter</artifactId>
<version>${ddf-common.version}</version>
</dependency>Aggregated modules:
ddf-common-apiddf-common-coreddf-common-mvcddf-common-authenticationddf-common-limit
Typical scenarios:
- Web API services
- Basic admin services
- Projects that need unified exception handling, unified responses, basic authentication, and rate limiting
Aggregated dependencies:
spring-boot-starter-jdbcmysql-connector-jdruid-spring-boot-3-starter
Unified configuration prefix:
customizer:
data:
mysql:
enabled: true
druid:
usePingMethod: falseAggregated dependencies:
spring-boot-starter-mailspring-boot-starter-actuatormicrometer-registry-prometheus
Unified configuration prefix:
customizer:
governance:
mail:
enabled: true
observability:
enabled: true
thread-pool:
enabled: true
metric-name: custom.thread.pool
scan-all: false
include-bean-name-patterns:
- "*Executor"
- "*Pool"
- "*Scheduler"
exclude-bean-name-patterns:
- "applicationTaskExecutor"Notes:
- Importing the governance starter does not fail if
spring.mail.*is absent. - Mail-related beans are only wired when the underlying mail beans exist.
- Supported thread pool beans can be auto-bound to Micrometer metrics by bean-name wildcard rules.
- Expose
management.endpoints.web.exposure.include=prometheusto let Prometheus scrape/actuator/prometheus. - See
docs/thread-pool-observability.mdfor Prometheus, Grafana, and alert rule templates.
Aggregated modules:
ddf-common-starter-webddf-common-data-mysql-starterddf-common-governance-starter
Typical scenarios:
- Standard backend business services
- Services that need rapid access to web, database, governance, and baseline middleware capabilities
The project has been prepared for Maven Central publication with the following focus areas:
- Standardized parent POM metadata
- Standardized child module names and descriptions
- Attached sources and Javadocs during release
- GPG signing for release artifacts
- Sonatype Central Publisher Portal plugin integration
Recommended pre-release checks:
- Central repository credentials are configured in
settings.xml - GPG is configured and available
- Releases are executed with the
releaseprofile
Related documents:
docs/releasing-to-maven-central.mddocs/versioning-and-release-policy.mddocs/public-module-policy.mddocs/release-readiness.mdCHANGELOG.md
Build with the repository-specific Maven settings:
mvn -s E:\apache-maven-3.9.12\conf\settings-snowball.xml clean install -DskipTestsBuild a specific module:
mvn -s E:\apache-maven-3.9.12\conf\settings-snowball.xml clean install -DskipTests -pl ddf-common-starter-default -amRun a release build:
mvn -Prelease clean deploy- This repository is a shared library project, not a runnable business application.
ddf-common-scriptis primarily an internal offline tooling module and is not recommended as a default business dependency.ddf-common-netty-brokeris currently more demo-oriented or protocol-specific and is excluded from the default Maven Central publishing set.- A business example project can reference
spring-boot-quick. - For lightweight integration, see
examples/minimal-web-service/README.md.
If you use the repository GitHub Actions release flow, prepare these repository secrets:
MAVEN_USERNAMEMAVEN_PASSWORDMAVEN_GPG_PRIVATE_KEYMAVEN_GPG_PASSPHRASE
Related workflows:
.github/workflows/ci.yml.github/workflows/release-central.yml
- Continue tightening module naming and responsibility boundaries
- Add minimal integration examples for each starter
- Improve auto-configuration conditions and test coverage
- Refine Maven Central release guidance and versioning workflow
Apache License 2.0