简体   繁体   中英

Default Mongodb settings for mongodb connection in spring-data-mongodb

I'm using Spring Boot and am trying to figure out how I can see a list of all the default properties for the MongoDB connection.

I looked at AbstractMongoClientConfiguration but it's abstract and I can't see where the defaults come from. Looking at the class hierarchy for this class I can't see any default implementation in the Spring libs I have.

Where are the defaults for this connection? I don't see any properties files either, but might be missing them.

Had the same issue not too long ago. The official spring-data-mongodb documentation doesn't really mention any details about connection properties and their default values.

However, you can find more detailed information about the connection parameters in the MongoDB Java Driver Documentation and even more detailed in the Connection string docs including some default values.

Spring Data MongoDB uses default values generated by calling the builder method for MongoClientSettings .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM