Skip to content

Instantly share code, notes, and snippets.

@zhentao
Created June 10, 2013 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhentao/5750132 to your computer and use it in GitHub Desktop.
Save zhentao/5750132 to your computer and use it in GitHub Desktop.
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class EmbeddedDataSourceConfig implements DataSourceConfig {
@Override
@Bean(destroyMethod="shutdown")
public DataSource dataSource() {
return new EmbeddedMysqlDatabaseBuilder().addSqlScript("tag_schema.sql").addSqlScript("tag_init.sql").build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment