Using 2 beans of the same type: javax.sql.DataSource in Spring

前端 未结 4 1027
南笙
南笙 2021-01-01 19:45

I am developing a Spring Boot based application in which I would like to create 2 beans: One will point to \'Oracle\' database; the other will point to Hive. I\'ve declar

4条回答
  •  粉色の甜心
    2021-01-01 20:20

    I faced similar issue. Added @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,DataSourceTransactionManagerAutoConfiguration.class})

    and added manual configuration. It worked!

提交回复
热议问题