技術選定とversion Spring Bootで複数のDataSourceを扱う方法は、使用するORMによって変わってくる。 ここではMyBatisの方法を書く。 検証version ・Spring Boot 1.3.3 ・MyBatis 3.3.1 ・MyBatis-Spring 1.2.4 今回の設定における前提 DBは二つ接続したい。 一つは自システム専用のDBで、もう一つは他システムのDB。 それぞれownとotherというDB名とする。 ownにはCustomerテーブル、otherにはOrderテーブルがある。 pom.xml Spring BootにMyBatisを組み込むためのライブラリの設定。 pom.xml <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-sprin
![Spring BootとMyBatisで複数のDBを扱うためのapplication.properties作成方法 - grep Tips *](https://cdn-ak-scissors.b.st-hatena.com/image/square/2fda440df2932eeb01d2d901ceb9bc1a45e1eab8/height=288;version=1;width=512/https%3A%2F%2Fwww.greptips.com%2Fimages%2Fogp%2F839.png)