Resource Annotation: No qualifying bean of type [javax.sql.DataSource] is defined: expected single matching bean but found 2

后端 未结 3 2010
醉酒成梦
醉酒成梦 2021-02-03 10:30

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

3条回答
  •  青春惊慌失措
    2021-02-03 11:03

    I my case, the configuration was on a xml file, so I only have to add the primary="true" to the bean tag of one of the defined datasources.

提交回复
热议问题