Tag

Database Switching

0 views collected around this technical thread.

Java Captain
Java Captain
May 2, 2025 · Databases

Implementing Dynamic MySQL Master‑Slave Switching in SpringBoot Using AOP and Custom Annotations

This article demonstrates how to use SpringBoot 3.0.4 with AOP and a custom @DataSource annotation to dynamically switch between MySQL master and slave databases, ensuring high availability by automatically falling back to the master when a slave fails, and provides configuration and code examples for multiple data sources.

AOPDatabase SwitchingDynamic DataSource
0 likes · 14 min read
Implementing Dynamic MySQL Master‑Slave Switching in SpringBoot Using AOP and Custom Annotations
JD Tech Talk
JD Tech Talk
Jan 8, 2025 · Backend Development

Dynamic Database Switching in MyBatis Using SQL Source Decoration

This article explains how to implement dynamic database switching in MyBatis by intercepting and modifying SQL statements to prepend database names to table names, using JSqlParser and MyBatis interceptors.

Database SwitchingDecorator PatternDynamic SQL
0 likes · 6 min read
Dynamic Database Switching in MyBatis Using SQL Source Decoration
Python Programming Learning Circle
Python Programming Learning Circle
Dec 28, 2020 · Backend Development

Dynamic Redis Database Switching in Flask with a Custom Wrapper

This article explains why the Flask‑Redis extension cannot switch Redis databases, describes the underlying limitation of redis‑py, and provides a Python class library that enables dynamic database selection, data push/pull, and clean connection handling for Flask applications.

Database SwitchingDynamic ConfigurationFlask
0 likes · 7 min read
Dynamic Redis Database Switching in Flask with a Custom Wrapper