alibaba/druid
45.0
Weak · 24 September 2026
272k
lines of production code
Java
primary language
5
measurements over time
What this system is
This system is a Java-based database connection pool and monitoring framework. It provides a high-performance, extensible connection pool that supports a wide variety of database dialects and integrates with Spring Boot for automatic configuration. The system also includes a web-based administrative dashboard for monitoring connection pools, SQL performance, and application statistics, with additional wrappers for legacy connection pool APIs.
How it got here
2011–2017 — Spring Boot 3 and 4 migration
12 changes.
The project was modernized to support Spring Boot 3 and 4, introducing comprehensive auto-configuration for Druid data sources and monitoring components. This period focused on updating build dependencies, establishing the initial repository structure, and implementing robust integration tests to validate the new Spring Boot 3 starter features.
2020–2022 — Admin dashboard and compatibility wrappers
6 changes.
This period focused on expanding the Druid ecosystem with a new web-based monitoring dashboard and a compatibility layer for legacy connection pools. The core library was also updated to support a wider range of database dialects and exception types.
2023–2026 — Spring Boot 3 and 4 integration
4 changes.
The project expanded its Spring Boot compatibility by introducing full auto-configuration and integration tests for Spring Boot 3, while also adding experimental support for Spring Boot 4. This period focused on modernizing the Druid starter modules to support the latest Spring Boot versions and Java module system requirements.
Features
Add Druid Admin monitoring dashboard with Kubernetes and service discovery support
The Druid Admin monitoring interface is introduced, providing a web-based dashboard to monitor database connection pools and SQL performance. The implementation adds a new \DruidAdminApplication\ entry point and registers a \MonitorViewServlet\ to serve the admin UI. The \MonitorStatService\ is added to aggregate and expose monitoring statistics, supporting both traditional service discovery (via \DiscoveryClient\) and direct Kubernetes pod discovery (via \K8sDiscoveryClient\). Configuration is centralized in \MonitorProperties\, allowing users to specify monitored applications, login credentials, context paths, and Kubernetes cluster access details (kubeconfig path, namespace). New DTOs (\ConnectionResult\, \DataSourceResult\, \SqlDetailResult\, \SqlListResult\, \WallResult\, \WebResult\) define the structure of the monitoring data returned by the API.
druid-admin/src/main/java · high confidence
Add Druid admin console UI and configuration for monitoring
The Druid admin console is now available with a new \bootstrap.yml\ configuration file that sets up the application server, Spring Cloud Consul/Nacos/Eureka discovery, and monitoring credentials. Additionally, new HTML resources have been added to the admin console, including an API reference page (\api.html\), a active connection stack trace viewer (\activeConnectionStackTrace.html\), and a pooling connection info table (\connectionInfo.html\), all styled with Bootstrap v2.1.0.
druid-admin/src/main/resources · high confidence
Add Druid-based wrappers for C3P0, Apache DBCP, and Proxool
The druid-wrapper module now provides compatibility classes that delegate to Alibaba's Druid connection pool. Specifically, it adds wrapper classes for C3P0 (ComboPooledDataSource, PooledDataSource), Apache Commons DBCP (BasicDataSource, BasicDataSourceFactory, ManagedBasicDataSource, and their MBeans), Apache Commons DBCP2 (BasicDataSource, BasicDataSourceFactory, BasicDataSourceMBean), and Proxool (ProxoolConstants, ProxoolDataSource). This allows applications using these legacy APIs to benefit from Druid's underlying implementation.
druid-wrapper · high confidence
Add DruidStatProperties for Spring Boot auto-configuration
A new \DruidStatProperties\ configuration class has been introduced in the \druid-spring-boot-starter\ module. This class maps \spring.datasource.druid\ properties to configure the Druid StatViewServlet and WebStatFilter, allowing users to enable and customize monitoring and filtering via Spring Boot externalized configuration.
druid-spring-boot-starter/src/main/java/com/alibaba/druid/spring/boot/autoconfigure/properties · medium confidence
Add Spring Boot 3 auto-configuration and metadata for Druid
The Druid Spring Boot 3 starter now includes an auto-configuration class (DruidDataSourceAutoConfigure) and associated metadata. The metadata file (additional-spring-configuration-metadata.json) defines default values for various Druid filters (Stat, Config, EncodingConvert, Slf4jLog, Log4j, Log4j2, CommonsLog, Wall), all set to false by default. It also provides hints for database types supported by the Stat and Wall filters, including Lealone, DM, Kingbase, and others.
druid-spring-boot-3-starter/src/main/resources, druid-spring-boot-starter/src/main/resources · high confidence
Add Spring Boot 3 auto-configuration for Druid
The druid-spring-boot-3-starter module now includes a complete set of Spring Boot 3 auto-configuration classes, including the new \DruidDataSourceAutoConfigure\, \DruidDataSourceWrapper\, and related stat/AOP/servlet configurations. This enables automatic setup of the Druid data source and monitoring features for applications using Spring Boot 3.
druid-spring-boot-3-starter/src/main/java · high confidence
Add Spring Boot 4.x support to Druid starter
The druid-spring-boot-4-starter module is introduced to provide experimental support for Spring Boot 4.x. This includes new auto-configuration classes (such as DruidDataSourceAutoConfigure and DruidDataSourceWrapper), filter configurations, and a demo application to demonstrate usage. Users can now integrate the Druid connection pool and monitoring features into Spring Boot 4.x projects using the new starter.
druid-spring-boot-4-starter · high confidence
Added Java 9+ module descriptor for Druid Spring Boot 3 Starter
A new module-info.java file was added to the druid-spring-boot-3-starter/src/moditect directory, defining the Java 9+ module descriptor for the Druid Spring Boot 3 Starter. This enables proper module path support for the Spring Boot 3 integration, exposing the autoconfigure, stat, and properties packages while declaring dependencies on Spring Boot, Spring Framework, Druid, SLF4J, and standard Java modules.
druid-spring-boot-3-starter/src/moditect · high confidence
Added Maven Wrapper for consistent build environments
The project now includes the Maven Wrapper, which ensures all developers and CI systems use the same Maven version (3.8.5) and wrapper JAR (0.5.6) without requiring a pre-installed Maven. This is achieved by adding the \MavenWrapperDownloader.java\ script and the \maven-wrapper.properties\ configuration file to the \.mvn/wrapper\ directory.
.mvn · high confidence
Added Spring Boot auto-configuration for Druid monitoring and statistics
The druid-spring-boot-starter now includes dedicated auto-configuration classes that wire up Druid's monitoring components as Spring beans. This includes StatFilter, ConfigFilter, EncodingConvertFilter, various logging filters (Slf4j, Log4j, Log4j2, Commons), and WallFilter/WallConfig beans, all controllable via spring.datasource.druid.filter.\* properties. Additionally, it adds Spring AOP support via DruidStatInterceptor and DefaultAdvisorAutoProxyCreator, and registers the StatViewServlet and WebStatFilter with configurable URL patterns, IP allow/deny lists, and session/profile settings. These changes enable out-of-the-box SQL monitoring, AOP-based statistics, and a web-based dashboard for Druid's stat view.
druid-spring-boot-starter/src/main/java/com/alibaba/druid/spring/boot/autoconfigure/stat · high confidence
Added druid-demo-petclinic demo application
Added a new demo application, druid-demo-petclinic, which integrates Druid data sources via druid-spring-boot-starter to build a Spring PetClinic sample application. This includes the full source code for the PetClinic application, configuration files (application.properties), and build/CI infrastructure (Maven/Gradle wrappers, GitHub Actions workflow, devcontainer setup).
druid-demo-petclinic · high confidence
Druid core library refactored and expanded with new database dialects
The core library has been refactored and expanded to support a significantly larger number of database dialects, including Athena, Databricks, Doris, Holo, Lealone, Redshift, Snowflake, Sundb, Supersql, Taosdata, and Tydb. The update also introduces a new exception hierarchy (DruidRuntimeException, FastsqlException, FastsqlColumnAmbiguousException, TransactionTimeoutException) and adds new constants for SQL monitoring configuration. Additionally, the version is updated to 1.2.29.
core · high confidence
Initial project scaffolding and repository configuration
The repository was initialized with essential configuration and documentation files. A .gitignore file was added to exclude build artifacts, IDE settings, and temporary files. Documentation files including README (English and Chinese), CONTRIBUTING, and AGENTS were added to guide users and contributors. A SECURITY.md file was created to outline the vulnerability reporting process. Additionally, a .travis.yml file was added to configure the CI/CD pipeline for Java builds and code coverage reporting. Utility scripts like mvnw and vtune.sh were also included to support building and benchmarking the project.
(repo-wide) · high confidence
Reintroduce Spring Boot auto-configuration for Druid data source
The Druid Spring Boot starter now provides automatic configuration for the Druid data source. A new \DruidDataSourceAutoConfigure\ class registers a \DruidDataSourceWrapper\ bean when the \spring.datasource.type\ property is set to \com.alibaba.druid.pool.DruidDataSource\. The wrapper automatically injects basic JDBC properties (username, password, URL, driver) from the standard Spring Boot \DataSourceProperties\ and allows Spring-managed \Filter\ beans to be auto-added to the connection pool. Additionally, a builder class \DruidDataSourceBuilder\ is provided to support multiple data source configurations, with a deprecated method included for compatibility with Spring Boot 1.x property binding behavior.
druid-spring-boot-starter/src/main/java/com/alibaba/druid/spring/boot/autoconfigure · medium confidence
Test coverage
Added Spring Boot 3 integration tests and demo application; Added demo application and model for testing; Added demo configurers for multi-datasource and issue-specific test scenarios; Added demo service layer for Spring Boot integration; Added demo web controllers for Druid statistics and user data; Added integration tests for Druid Spring Boot Starter; Added test configuration files for the Druid Spring Boot Starter.
Dependencies
Updated project dependencies and build configuration
The project's Maven build files (pom.xml) and related module configurations have been updated. This includes upgrading the Spring Boot version to 2.7.9 for the standard Spring Boot starter, introducing new Spring Boot 3 and 4 starters, and updating the core library's dependencies to include Jakarta Servlet 5.0.0 and Spring 4.3.20.RELEASE. Additionally, the build configuration now enforces LF line endings and includes updated versions for JUnit 5.11.4 and JMH 1.37.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 40 → 45 (+4.8)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 55 → 59 (+3.2)
- Architecture 99 → 98 (-1.2)
- Maturity 64 → 61 (-3.0)
- Readiness 29 → 46 (+16.6)
- Security 70 → 71 (+0.6)
- Accessibility 34 → 33 (-1.4)
Resolved (1051)
- CKOutputVisitor.visit (cognitive 20) (core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java)
- CKOutputVisitor.visit (cognitive 29) (core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java)
- CalciteMySqlNodeVisitor.visit (cognitive 23) (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- CalciteMySqlNodeVisitor.visit (cognitive 47) (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- CalciteMySqlNodeVisitor.visit (cognitive 67) (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- Change coupling: OdpsCreateTableParser.java ↔ OdpsOutputVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsCreateTableParser.java)
- Change coupling: OdpsSelectParser.java ↔ OdpsOutputVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsSelectParser.java)
- Change coupling: OdpsStatementParser.java ↔ OdpsOutputVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/odps/parser/OdpsStatementParser.java)
- Change coupling: SQLServerStatementParser.java ↔ SQLServerASTVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java)
- Change coupling: SQLServerStatementParser.java ↔ SQLServerSchemaStatVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java)
- Coverage not included — suite not readable by the collector
- DB2OutputVisitor.visit (cognitive 23) (core/src/main/java/com/alibaba/druid/sql/dialect/db2/visitor/DB2OutputVisitor.java)
- DB2OutputVisitor.visit (cognitive 31) (core/src/main/java/com/alibaba/druid/sql/dialect/db2/visitor/DB2OutputVisitor.java)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- DmOutputVisitor.visit (cognitive 28) (core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java)
- DmOutputVisitor.visit (cognitive 36) (core/src/main/java/com/alibaba/druid/sql/dialect/dm/visitor/DmOutputVisitor.java)
- Duplicated block (10 lines × 2) (core/src/main/java/com/alibaba/druid/pool/DruidAbstractDataSource.java)
- Duplicated block (10 lines × 2) (core/src/main/java/com/alibaba/druid/sql/ast/SQLDataTypeImpl.java)
- Duplicated block (10 lines × 2) (core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLContainsExpr.java)
- Duplicated block (10 lines × 2) (core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLMethodInvokeExpr.java)
- …and 1031 more
New (2661)
- (anonymous)::template (cognitive 16) (core/src/main/resources/support/http/resources/js/doT.js)
- (anonymous)::template (cognitive 16) (druid-admin/src/main/resources/support/http/resources/js/doT.js)
- (anonymous)::template (cyclomatic 16) (core/src/main/resources/support/http/resources/js/doT.js)
- (anonymous)::template (cyclomatic 16) (druid-admin/src/main/resources/support/http/resources/js/doT.js)
- CKOutputVisitor.visit (cognitive 20) (core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java)
- CKOutputVisitor.visit (cognitive 29) (core/src/main/java/com/alibaba/druid/sql/dialect/clickhouse/visitor/CKOutputVisitor.java)
- CalciteMySqlNodeVisitor.visit (cognitive 23) (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- CalciteMySqlNodeVisitor.visit (cognitive 47) (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- CalciteMySqlNodeVisitor.visit (cognitive 67) (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- Change coupling: BigQueryStatementParser.java ↔ BigQueryVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/bigquery/parser/BigQueryStatementParser.java)
- Change coupling: OracleCreateTableParser.java ↔ OracleOutputVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/oracle/parser/OracleCreateTableParser.java)
- Change coupling: PGSQLStatementParser.java ↔ PGASTVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSQLStatementParser.java)
- Change coupling: PGSQLStatementParser.java ↔ PGASTVisitorAdapter.java (core/src/main/java/com/alibaba/druid/sql/dialect/postgresql/parser/PGSQLStatementParser.java)
- Change coupling: SQLBinaryOperator.java ↔ Token.java (core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLBinaryOperator.java)
- Change-coupling hub: OdpsOutputVisitor.java → OdpsCreateTableParser.java, OdpsSelectParser.java, OdpsStatementParser.java (core/src/main/java/com/alibaba/druid/sql/dialect/odps/visitor/OdpsOutputVisitor.java)
- Change-coupling hub: SQLASTOutputVisitor.java → BigQueryStatementParser.java, HiveCreateTableParser.java, SQLServerSelectParser.java, SQLServerASTVisitor.java, SQLCreateTableParser.java (core/src/main/java/com/alibaba/druid/sql/visitor/SQLASTOutputVisitor.java)
- Change-coupling hub: SQLServerStatementParser.java → SQLServerASTVisitor.java, SQLServerOutputVisitor.java, SQLServerSchemaStatVisitor.java (core/src/main/java/com/alibaba/druid/sql/dialect/sqlserver/parser/SQLServerStatementParser.java)
- ClassTooLong: CalciteMySqlNodeVisitor (core/src/main/java/com/alibaba/druid/support/calcite/CalciteMySqlNodeVisitor.java)
- ClassTooLong: CallableStatementProxyImpl (core/src/main/java/com/alibaba/druid/proxy/jdbc/CallableStatementProxyImpl.java)
- ClassTooLong: DatabaseMetaDataProxyImpl (core/src/main/java/com/alibaba/druid/proxy/jdbc/DatabaseMetaDataProxyImpl.java)
- …and 2641 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
alibaba/druid was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 24 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit fa8dc9912637a2f729eef9f55356621fec18d40e — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-ae95d6cad036.