Multiple DataSource and JdbcTemplate in Spring Boot (> 1.1.0)

前端 未结 2 1348
天涯浪人
天涯浪人 2020-12-25 10:46

I would like to inject a specific JdbcTemplatein a Spring Boot project. I tried to follow this example for multiple DataSourceconfiguration : http:

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-25 11:28

    Try to move @Qualifier annotation to the parameter on your @Bean methods for JdbcTemplate.

    I guess, when you remove @Primary you end up with error, where more than one appropriate beans are presented

提交回复
热议问题