I set up a new Spring Boot Application including only the spring-boot-starter-data-mongodb dependency and added basic mongodb configs (host, port, username, password, ..) in the application.properties.
When I execute the application the following appears in the console:
2020-12-27 23:30:21.306 INFO 25230 --- [localhost:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:1, serverValue:86}] to localhost:27017
2020-12-27 23:30:21.306 INFO 25230 --- [localhost:27017] org.mongodb.driver.connection : Opened connection [connectionId{localValue:2, serverValue:87}] to localhost:27017
I am curios why the connection was opened twice by spring. Isn't one opened connection enough?