awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
baomidou avatar

baomidou/dynamic-datasource

0
View on GitHub↗
5,177 stars·1,245 forks·Java·Apache-2.0·15 viewsdoc.xiuceyun.cn↗

Dynamic Datasource

This project is a dynamic datasource manager for Spring Boot designed to handle multiple database connections and switch between them at runtime. It provides a system for managing database read-write splitting, coordinating distributed transactions across disparate databases, and updating connection settings without requiring an application restart.

The framework differentiates itself through its ability to route traffic based on user sessions or headers to support multi-tenant architectures. It also includes a mechanism for encrypting sensitive database credentials within configuration files to prevent plain text exposure.

The capability surface extends to database connection routing, read-write splitting between master and slave nodes, and lazy connection initialization to reduce startup time. It further manages data consistency through centralized transaction control and supports the runtime addition or removal of database connection configurations.

Features

  • Spring Boot Database Access - Provides a framework for Spring Boot that handles multiple database connections and switches between them at runtime.
  • Runtime Connection Configuration - Enables adding or modifying database connection settings without requiring an application restart.
  • Request Routing - Directs requests to specific database groups to support read-write splitting and master-slave replication.
  • Runtime Connection Management - Allows programmatically adding, removing, or switching database connection configurations while the application is running.
  • Dynamic Connection Switching - Evaluates dynamic parameters from sessions or headers to swap active database connections at runtime.
  • Read-Write Splitting - Routes traffic between master and slave databases to optimize performance and load balancing.
  • Tenant Request Routing - Directs application requests to different databases based on user sessions or headers to support multi-tenant architectures.
  • Multi-datasource Configurators - Provides a system for defining and switching between multiple named database connections within a single application.
  • Read-Write Splitting - Optimizes database performance by routing read queries to slave nodes and write queries to the master node.
  • Context-Aware Connection Selection - Determines the target database by retrieving routing keys from thread-local storage or request headers.
  • Dynamic Proxy Routing - Wraps the data source in a proxy that delegates queries to different physical connections based on the current context.
  • Connection Route Switching - Implements AOP-based interception to switch database connections dynamically based on annotations.
  • Secure Database Configurations - Protects sensitive database credentials in configuration files using encryption to prevent plain text exposure.
  • Lazy Connection Initialization - Delays the creation of database connections until the first request occurs to reduce startup time.
  • Lazy Connection Initialization - Postpones the creation of database connection pools until the first request to reduce startup time.
  • Runtime Configuration Refreshes - Updates the internal data source map and connection pools without restarting the application when configuration changes.
  • Credential Encryption - Protects sensitive connection information in configuration files using built-in or custom encryption methods.
  • Distributed Transaction Coordinators - Coordinates commit and rollback operations across multiple data sources by hooking into a distributed transaction coordinator.

Star history

Star history chart for baomidou/dynamic-datasourceStar history chart for baomidou/dynamic-datasource

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Dynamic Datasource

Similar open-source projects, ranked by how many features they share with Dynamic Datasource.
  • pgdogdev/pgdogpgdogdev avatar

    pgdogdev/pgdog

    3,361View on GitHub↗

    pgdog is a PostgreSQL sharding proxy, distributed SQL router, and connection pooler. It is designed to enable horizontal data distribution by splitting tables and indices across multiple independent servers to scale storage and processing capacity. The project distinguishes itself through online resharding capabilities, using logical replication to move data between shards without application downtime. It supports multiple routing strategies, including hash, list, and range-based query routing, and manages distributed atomic transactions using a two-phase commit process to ensure consistency

    Rustload-balancerpoolerpostgresql
    View on GitHub↗3,361
  • gaarason/database-allgaarason avatar

    gaarason/database-all

    1,033View on GitHub↗

    This project is a Java-based object-relational mapping framework that utilizes the active record pattern to simplify database interactions. It provides a comprehensive data access layer that binds database tables directly to application objects, enabling developers to perform CRUD operations, manage complex entity relationships, and execute queries through a fluent, type-safe interface. Designed for integration with Spring Boot, the framework abstracts database complexities while maintaining support for native compilation and asynchronous execution. The framework distinguishes itself through

    Javadatabaseeloquenteloquent-orm
    View on GitHub↗1,033
  • go-xorm/xormgo-xorm avatar

    go-xorm/xorm

    6,628View on GitHub↗

    xorm is a relational mapper and object-relational mapping tool for Go. It translates Go structures into SQL queries and maps database rows back into native objects, providing a multi-dialect database driver that supports MySQL, PostgreSQL, SQLite, Oracle, SQL Server, and TiDB. The project features a read-write splitting manager that routes modification requests to a primary database and read requests to replicas. It includes a database schema synchronizer to automatically align table structures and indexes with application data models, as well as a fluent SQL query builder for constructing co

    Gogolangmssqlmysql
    View on GitHub↗6,628
  • dotnetcore/freesqldotnetcore avatar

    dotnetcore/FreeSql

    4,388View on GitHub↗

    FreeSql is a .NET object-relational mapper and data access layer that translates object-oriented code into SQL for multiple relational database providers. It functions as a fluent SQL query builder and database schema synchronizer, allowing developers to align database table and index structures with entity class definitions. The framework is specifically optimized for .NET Native AOT to ensure reduced memory footprints and faster startup times. It includes a database traffic manager to distribute load through read-write splitting, dynamic table sharding, and tenant-based data isolation. Bro

    C#accessclickhousecodefirst
    View on GitHub↗4,388
See all 30 alternatives to Dynamic Datasource→

Frequently asked questions

What does baomidou/dynamic-datasource do?

This project is a dynamic datasource manager for Spring Boot designed to handle multiple database connections and switch between them at runtime. It provides a system for managing database read-write splitting, coordinating distributed transactions across disparate databases, and updating connection settings without requiring an application restart.

What are the main features of baomidou/dynamic-datasource?

The main features of baomidou/dynamic-datasource are: Spring Boot Database Access, Runtime Connection Configuration, Request Routing, Runtime Connection Management, Dynamic Connection Switching, Read-Write Splitting, Tenant Request Routing, Multi-datasource Configurators.

What are some open-source alternatives to baomidou/dynamic-datasource?

Open-source alternatives to baomidou/dynamic-datasource include: pgdogdev/pgdog — pgdog is a PostgreSQL sharding proxy, distributed SQL router, and connection pooler. It is designed to enable… gaarason/database-all — This project is a Java-based object-relational mapping framework that utilizes the active record pattern to simplify… go-xorm/xorm — xorm is a relational mapper and object-relational mapping tool for Go. It translates Go structures into SQL queries… dotnetcore/freesql — FreeSql is a .NET object-relational mapper and data access layer that translates object-oriented code into SQL for… xkcoding/spring-boot-demo — This project is a comprehensive reference collection of practical implementation examples and patterns for building… thinkgem/jeesite — Jeesite is a full-stack low-code development framework designed for building enterprise administrative portals using…