Reputation: 875
I am using spring-boot along with spring-data-mongodb. But I have to configure a separate connection pool. Is it Possible?
Upvotes: 1
Views: 2461
Reputation: 76004
Here all the properties that you can currently configure for mongodb in spring boot.
https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
spring.data.mongodb.authentication-database= # Authentication database name.
spring.data.mongodb.database=test # Database name.
spring.data.mongodb.field-naming-strategy= # Fully qualified name of the FieldNamingStrategy to use.
spring.data.mongodb.grid-fs-database= # GridFS database name.
spring.data.mongodb.host=localhost # Mongo server host.
spring.data.mongodb.password= # Login password of the mongo server.
spring.data.mongodb.port=27017 # Mongo server port.
spring.data.mongodb.repositories.enabled=true # Enable Mongo repositories.
spring.data.mongodb.uri=mongodb://localhost/test # Mongo database URI. When set, host and port are ignored.
spring.data.mongodb.username= # Login user of the mongo server.
You can configure the connection pool properties by autowiring MongoClientOptionsFactoryBean.
Upvotes: 3