I am using Spring Java Based configuration for configure multiple database with Spring Data.
In the configuration file, i am creating two data source
for MySQ
I had the same problem and found this old post that explained it:
http://xantorohara.blogspot.ch/2013/11/spring-boot-jdbc-with-multiple.html
It looks like if you need multiple data sources, the Spring Boot magic runs out, and you have to take over the configuration manually.
In my case, I had to modify the EnableAutoConfiguration to take over the data source and transaction manager configuration myself:
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class,DataSourceTransactionManagerAutoConfiguration.class})
It looks like the Spring Boot magic ran out at the point I had to use multiple data sources...