I\'m trying to Autowire a database by
@Autowired private DataSource dataSource;
I have one datasource in my application.yml
application.yml
I solved by adding qualifier above the property:
@Autowired @Qualifier("dataSource") private DataSource dataSource;