BAEL-1635: Spring Boot CLI (#3886)

* BAEL-1635: Spring Boot CLI

* Modified packages for consistent naming
This commit is contained in:
Adam InTae Gerard
2018-03-31 11:45:58 -07:00
committed by KevinGilmore
parent 6549e41afa
commit 323f5bf370
9 changed files with 122 additions and 27 deletions
@@ -0,0 +1,23 @@
package bael.data
@Grab('h2')
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType
import org.springframework.web.servlet.config.annotation.EnableWebMvc
import javax.sql.DataSource
@Configuration
@EnableWebMvc
@ComponentScan('bael.data')
class DataConfig {
@Bean
DataSource dataSource() {
return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).build();
}
}