package digital.laboratory.platform.entrustment.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import javax.sql.DataSource;

@Configuration
public class MyDatasources {
	@Bean(name = "businessDataSource")
	@Primary
	@ConfigurationProperties(prefix = "dlp.datasource")
	public DataSource primaryDataSource() {
		return DataSourceBuilder.create().build();
	}
}
