Skip to content

Using multiple datasources

johnmcclean-aol edited this page Oct 28, 2015 · 1 revision

If you are using the micro-data plugin Microserver will configure a Spring managed datasource for you. You can speficiy datasource configuration via the following properties

The datasource bean will have the name "mainDataSource". To use this datasource in the same application as other Spring managed Datasources be sure to use a Qualifier e.g.

@Autowired(
public void setDataSourceForJDBC(@Qualifier("mainDataSource") DataSource dataSource) {
	this.setJdbcTemplate(new JdbcTemplate(dataSource));
}