Tag

multiple data sources

1 views collected around this technical thread.

IT Services Circle
IT Services Circle
Jan 5, 2025 · Backend Development

Integrating Spring Boot with MyBatis and Multiple Data Sources (Dynamic DataSource)

This article explains how to integrate Spring Boot with MyBatis, configure a single Druid data source, implement a dynamic routing data source for multiple databases, and use custom annotations and AOP to switch databases at runtime, including full code examples and transaction management.

Database IntegrationDynamic DataSourceJava
0 likes · 16 min read
Integrating Spring Boot with MyBatis and Multiple Data Sources (Dynamic DataSource)
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 7, 2023 · Backend Development

How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis

This guide walks through setting up a Spring Boot 2.4.12 project with JDK 1.8, Oracle, and two data sources—master and slave—covering Maven dependencies, application.yml settings, custom property classes, HikariDataSource beans, JPA EntityManagerFactory, MyBatis SqlSessionFactory, mapper scanning, and testing entity creation to verify successful configuration.

HikariCPJPAMyBatis
0 likes · 21 min read
How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 3, 2021 · Backend Development

How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis

This guide walks through setting up a Spring Boot 2.1.4 application with JDK 1.8, Oracle, and HikariCP to use separate master and slave data sources, covering Maven dependencies, YAML configuration, custom property classes, JPA EntityManager factories, MyBatis SqlSession factories, mapper scanning, and sample entity definitions.

HikariCPJPAMyBatis
0 likes · 19 min read
How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis