19 lines
560 B
Java
19 lines
560 B
Java
package com.yam.app.account.infrastructure;
|
|
|
|
import javax.sql.DataSource;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
|
|
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
|
|
|
@Configuration
|
|
public class DatabaseConfiguration {
|
|
|
|
@Bean
|
|
public DataSource dataSource() {
|
|
return new EmbeddedDatabaseBuilder()
|
|
.setType(EmbeddedDatabaseType.H2)
|
|
.build();
|
|
}
|
|
}
|