package com.hamidh.azad92.flash.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import javax.annotation.PostConstruct;
import javax.sql.DataSource;
/**
* The data source config that can be used in integration tests.
*/
@Configuration
@Profile("test")
public class EmbeddedDataSourceConfig implements DataSourceConfig {
@Override
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.HSQL)
.build();
}
}