本文整理匯總了Java中com.wix.mysql.config.SchemaConfig類的典型用法代碼示例。如果您正苦於以下問題:Java SchemaConfig類的具體用法?Java SchemaConfig怎麽用?Java SchemaConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SchemaConfig類屬於com.wix.mysql.config包,在下文中一共展示了SchemaConfig類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: schemaConfigViaBuilder
import com.wix.mysql.config.SchemaConfig; //導入依賴的package包/類
@Test
public void schemaConfigViaBuilder() {
SchemaConfig schema = aSchemaConfig("aSchema")
.withScripts(classPathScript("db/001_init.sql"))
.withCharset(LATIN1)
.build();
EmbeddedMysql mysqld = anEmbeddedMysql(v5_6_latest)
.addSchema(schema)
.addSchema("aschema2", classPathScripts("db/*.sql"))
.start();
//do work
mysqld.stop(); //optional, as there is a shutdown hook
}
示例2: schemaReset
import com.wix.mysql.config.SchemaConfig; //導入依賴的package包/類
@Test
public void schemaReset() {
EmbeddedMysql mysqld = anEmbeddedMysql(v5_6_latest)
.addSchema("aschema", classPathScript("db/001_init.sql"))
.start();
//do work
SchemaConfig schema = aSchemaConfig("aschema")
.withScripts(classPathScript("db/001_init.sql"))
.build();
mysqld.reloadSchema(schema);
//continue on doing work
mysqld.stop(); //optional, as there is a shutdown hook
}
示例3: schemaConfig
import com.wix.mysql.config.SchemaConfig; //導入依賴的package包/類
@Bean
public SchemaConfig schemaConfig() {
return aSchemaConfig(SCHEMA_NAME)
.build();
}