连接报错 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用同样的密码连接是成功的

springboot 连接mongodb授权失败

,但用程序连接就不行.

springboot 连接mongodb授权失败

没找到具体原因,不过将application.yml配置文件中的密码换成字符串就好了.

原配置:

springboot 连接mongodb授权失败

现配置:

springboot 连接mongodb授权失败

相关文章:

  • 2022-12-23
  • 2021-11-06
  • 2022-01-01
  • 2021-10-01
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-16
  • 2021-09-29
  • 2021-12-27
  • 2021-07-29
  • 2021-07-13
  • 2021-11-05
相关资源
相似解决方案