Registry / database / dynamic-datasource-spring-boot-starter

dynamic-datasource-spring-boot-starter

JSON →
library4.5.0javamavenunverified

A Spring Boot starter that provides dynamic datasource switching for multi-tenant or multi-database applications.

database
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

com.baomidou.dynamic.datasource.annotation.DS

Use @DS annotation to switch datasource on a method.

import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.stereotype.Service; @Service public class MyService { @DS("slave") public void readFromSlave() { // This method uses the 'slave' datasource } }
Debug
Known footguns
gotchaEnsure datasource names match exactly with configuration keys; mismatches cause runtime errors.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
3
claudebot
3
mj12bot
2
ahrefsbot
1
Resources