SpringBoot+MyBatis-Plus+Oracle realizes multiple data source configuration

1. The pom.xml file is added
insert image description here
2. application.yml configures
insert image description heremaster as the primary data source and secondary as the second data source

3.pojo file configuration
insert image description here
3.mapper file configuration, @DS("secondary") specifies the second data source to fetch data
insert image description here

Guess you like

Origin blog.csdn.net/weixin_44812604/article/details/127386828