use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabase in project SpringStepByStep by JavaProgrammerLB.
the class DatabaseConfig method dataSource.
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL).addScript("sql/create-db.sql").addScript("sql/insert-data.sql").build();
return db;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabase in project SpringStepByStep by JavaProgrammerLB.
the class DatabaseConfig method dataSource.
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL).build();
return db;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabase in project nikita-noark5-core by HiOA-ABI.
the class DemoDataSource method dataSource.
// Note: use the following string when accessing the database jdbc:h2:mem:n5DemoDb
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.H2).setName("n5DemoDb").build();
return db;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabase in project nikita-noark5-core by HiOA-ABI.
the class DevDataSource method dataSource.
// Note: use the following string when checking database jdbc:h2:mem:n5DemoDb
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.H2).setName("n5DevDb").build();
return db;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabase in project nikita-noark5-core by HiOA-ABI.
the class TestDataSource method dataSource.
// Note: use the following string when checking database jdbc:h2:mem:n5DemoDb
@Bean
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
EmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.H2).setName("test").build();
return db;
}
Aggregations