Tagged articles
7 articles
Page 1 of 1
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.

HikariCPMultiple Data SourcesMyBatis
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.

HikariCPMultiple Data SourcesMyBatis
0 likes · 19 min read
How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis
Code Ape Tech Column
Code Ape Tech Column
Oct 21, 2020 · Backend Development

Mastering Spring Boot: How to Integrate Multiple Data Sources with MyBatis

This tutorial explains how to configure Spring Boot with a single Druid data source, extend it to multiple dynamic data sources using AbstractRoutingDataSource, and seamlessly integrate MyBatis, including custom annotations, AOP switching, thread‑local isolation, and transaction management for robust multi‑database applications.

Dynamic Data SourceMultiple Data SourcesMyBatis
0 likes · 18 min read
Mastering Spring Boot: How to Integrate Multiple Data Sources with MyBatis
Programmer DD
Programmer DD
Jun 26, 2020 · Backend Development

How to Configure Multiple Data Sources with MyBatis in Spring Boot

Learn step-by-step how to set up and test multiple data sources in a Spring Boot application using MyBatis, covering property configuration, DataSource beans, mapper scanning, entity definitions, and verification through unit tests with complete code examples and key configuration notes.

Database ConfigurationMultiple Data SourcesMyBatis
0 likes · 11 min read
How to Configure Multiple Data Sources with MyBatis in Spring Boot