springboot 连接mogodb,报错Command failed with error 10107: 'not master' on server
Closed connection [connectionId{localValue:2, serverValue:389122}] to 10.2.2.139:27017 because there was a socket exception raised on another connection from this pool.
原因: mongodb集群的主从节点换了,主节点由139换成了138,连接时的配置,只配了139,因此报错。
解决:将主从节点都写在配置中