1、springboot连接mongodb5报错org.springframework.data.mongodb.UncategorizedMongoDbException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-256, userName='xxx', source='xxx', password=<hidden>, mechanismProperties=<hidden>}; nested exception is com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-256, userName='xxx', source='xxx', password=<hidden>, mechanismProperties=<hidden>}
2、修改配置,加上authentication-database: admin即可解决