Using auto create container flag in reactive repository
This commit is contained in:
Родитель
0ac8d64328
Коммит
a4fb017e21
|
@ -33,7 +33,9 @@ public class SimpleReactiveCosmosRepository<T, K extends Serializable> implement
|
|||
this.cosmosOperations = applicationContext.getBean(ReactiveCosmosOperations.class);
|
||||
this.entityInformation = metadata;
|
||||
|
||||
createContainerIfNotExists();
|
||||
if (this.entityInformation.isAutoCreateContainer()) {
|
||||
createContainerIfNotExists();
|
||||
}
|
||||
}
|
||||
|
||||
public SimpleReactiveCosmosRepository(CosmosEntityInformation<T, K> metadata,
|
||||
|
@ -41,7 +43,9 @@ public class SimpleReactiveCosmosRepository<T, K extends Serializable> implement
|
|||
this.cosmosOperations = reactiveCosmosOperations;
|
||||
this.entityInformation = metadata;
|
||||
|
||||
createContainerIfNotExists();
|
||||
if (this.entityInformation.isAutoCreateContainer()) {
|
||||
createContainerIfNotExists();
|
||||
}
|
||||
}
|
||||
|
||||
private CosmosContainerResponse createContainerIfNotExists() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче