awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
baomidou avatar

baomidou/dynamic-datasource

0
View on GitHub↗
5,177 星标·1,245 分支·Java·Apache-2.0·3 次浏览doc.xiuceyun.cn↗

Dynamic Datasource

本项目是一个专为 Spring Boot 设计的动态数据源管理器,用于处理多个数据库连接并在运行时进行切换。它提供了一个用于管理数据库读写分离、协调跨不同数据库的分布式事务,以及在无需重启应用的情况下更新连接设置的系统。

该框架通过其根据用户会话或请求头路由流量以支持多租户架构的能力脱颖而出。它还包含一种在配置文件中加密敏感数据库凭据的机制,以防止明文泄露。

其能力范围扩展至数据库连接路由、主从节点间的读写分离,以及用于减少启动时间的懒连接初始化。它进一步通过集中式事务控制管理数据一致性,并支持运行时添加或移除数据库连接配置。

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 历史

baomidou/dynamic-datasource 的 Star 历史图表baomidou/dynamic-datasource 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Dynamic Datasource 的开源替代方案

相似的开源项目,按与 Dynamic Datasource 的功能重合度排序。
  • pgdogdev/pgdogpgdogdev 的头像

    pgdogdev/pgdog

    3,361在 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
    在 GitHub 上查看↗3,361
  • gaarason/database-allgaarason 的头像

    gaarason/database-all

    1,033在 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
    在 GitHub 上查看↗1,033
  • go-xorm/xormgo-xorm 的头像

    go-xorm/xorm

    6,628在 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
    在 GitHub 上查看↗6,628
  • dotnetcore/freesqldotnetcore 的头像

    dotnetcore/FreeSql

    4,388在 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
    在 GitHub 上查看↗4,388
查看 Dynamic Datasource 的所有 30 个替代方案→

常见问题解答

baomidou/dynamic-datasource 是做什么的?

本项目是一个专为 Spring Boot 设计的动态数据源管理器,用于处理多个数据库连接并在运行时进行切换。它提供了一个用于管理数据库读写分离、协调跨不同数据库的分布式事务,以及在无需重启应用的情况下更新连接设置的系统。

baomidou/dynamic-datasource 的主要功能有哪些?

baomidou/dynamic-datasource 的主要功能包括:Spring Boot Database Access, Runtime Connection Configuration, Request Routing, Runtime Connection Management, Dynamic Connection Switching, Read-Write Splitting, Tenant Request Routing, Multi-datasource Configurators。

baomidou/dynamic-datasource 有哪些开源替代品?

baomidou/dynamic-datasource 的开源替代品包括: 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…