连接报错 org.springframework.data.mongodb.UncategorizedMongoDbException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-256, userName='peter', source='data_export', password=<hidden>, mechanismProperties=<hidden>}; nested exception is com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=SCRAM-SHA-256, userName='peter', source='data_export', password=<hidden>, mechanismProperties=<hidden>},
首先检查密码用户名都是对的,studio3t用同样的密码连接是成功的
,但用程序连接就不行.
没找到具体原因,不过将application.yml配置文件中的密码换成字符串就好了.
原配置:
现配置: