diff --git a/commons-core/pom.xml b/commons-core/pom.xml
index 649eed9..a299bfd 100644
--- a/commons-core/pom.xml
+++ b/commons-core/pom.xml
@@ -7,11 +7,11 @@
ru.sokomishalov.commons
commons-parent
- 1.0.22
+ 1.0.23
commons-core
- 1.0.22
+ 1.0.23
1.3.50
diff --git a/commons-spring/pom.xml b/commons-spring/pom.xml
index 757fc8d..603739b 100644
--- a/commons-spring/pom.xml
+++ b/commons-spring/pom.xml
@@ -7,11 +7,11 @@
ru.sokomishalov.commons
commons-parent
- 1.0.22
+ 1.0.23
commons-spring
- 1.0.22
+ 1.0.23
1.3.50
@@ -31,7 +31,7 @@
ru.sokomishalov.commons
commons-core
- 1.0.22
+ 1.0.23
diff --git a/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/locks/cluster/mongo/MongoReactiveLockProvider.kt b/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/locks/cluster/mongo/MongoReactiveLockProvider.kt
index 5f2c4ee..b15f621 100644
--- a/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/locks/cluster/mongo/MongoReactiveLockProvider.kt
+++ b/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/locks/cluster/mongo/MongoReactiveLockProvider.kt
@@ -28,6 +28,7 @@ import com.mongodb.reactivestreams.client.MongoCollection
import kotlinx.coroutines.reactive.awaitFirstOrElse
import kotlinx.coroutines.reactive.awaitSingle
import org.bson.Document
+import org.springframework.boot.autoconfigure.mongo.MongoProperties
import ru.sokomishalov.commons.core.common.unit
import ru.sokomishalov.commons.spring.locks.cluster.LockInfo
import ru.sokomishalov.commons.spring.locks.cluster.LockProvider
@@ -39,7 +40,8 @@ import java.util.*
class MongoReactiveLockProvider(
private val client: MongoClient = MongoClients.create(),
- private val databaseName: String = DEFAULT_DB_NAME,
+ private val mongoProperties: MongoProperties? = null,
+ private val databaseName: String = mongoProperties?.mongoClientDatabase ?: DEFAULT_DB_NAME,
private val collectionName: String = DEFAULT_COLLECTION_NAME
) : LockProvider {
diff --git a/pom.xml b/pom.xml
index 4a383d4..66ac6ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ru.sokomishalov.commons
commons-parent
- 1.0.22
+ 1.0.23
pom