本文整理汇总了Java中org.springframework.data.cassandra.config.SchemaAction类的典型用法代码示例。如果您正苦于以下问题:Java SchemaAction类的具体用法?Java SchemaAction怎么用?Java SchemaAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SchemaAction类属于org.springframework.data.cassandra.config包,在下文中一共展示了SchemaAction类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasRecreateSchemaActionSet
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Test
public void hasRecreateSchemaActionSet() {
createTestKeyspaceIfNotExists();
this.context = new AnnotationConfigApplicationContext();
String cityPackage = City.class.getPackage().getName();
AutoConfigurationPackages.register(this.context, cityPackage);
EnvironmentTestUtils.addEnvironment(this.context,
"spring.data.cassandra.schemaAction:RECREATE_DROP_UNUSED",
"spring.data.cassandra.keyspaceName:boot_test");
this.context.register(CassandraAutoConfiguration.class,
CassandraDataAutoConfiguration.class);
this.context.refresh();
CassandraSessionFactoryBean bean = this.context
.getBean(CassandraSessionFactoryBean.class);
assertThat(bean.getSchemaAction()).isEqualTo(SchemaAction.RECREATE_DROP_UNUSED);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:17,代码来源:CassandraDataAutoConfigurationIntegrationTests.java
示例2: hasDefaultSchemaActionSet
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Test
public void hasDefaultSchemaActionSet() {
this.context = new AnnotationConfigApplicationContext();
String cityPackage = City.class.getPackage().getName();
AutoConfigurationPackages.register(this.context, cityPackage);
this.context.register(CassandraAutoConfiguration.class,
CassandraDataAutoConfiguration.class);
this.context.refresh();
CassandraSessionFactoryBean bean = this.context
.getBean(CassandraSessionFactoryBean.class);
assertThat(bean.getSchemaAction()).isEqualTo(SchemaAction.NONE);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:14,代码来源:CassandraDataAutoConfigurationIntegrationTests.java
示例3: getSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Override
public SchemaAction getSchemaAction() {
return SchemaAction.RECREATE;
}
示例4: getSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Override
public SchemaAction getSchemaAction() {
return SchemaAction.RECREATE;
}
示例5: getSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Override
public SchemaAction getSchemaAction() {
return SchemaAction.CREATE_IF_NOT_EXISTS;
}
示例6: getSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Override
public SchemaAction getSchemaAction() {
return this.cassandraProperties.getSchemaAction();
}
示例7: getSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@NotNull
public SchemaAction getSchemaAction() {
return schemaAction;
}
示例8: setSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
public void setSchemaAction(SchemaAction schemaAction) {
this.schemaAction = schemaAction;
}
示例9: getSchemaAction
import org.springframework.data.cassandra.config.SchemaAction; //导入依赖的package包/类
@Override
public SchemaAction getSchemaAction() {
return SchemaAction.RECREATE_DROP_UNUSED; // Please note that, in production, you would want a different schema
}