Caused by: com.mongodb.MongoCommandException: Command failed with error 18 (AuthenticationFailed): 'Authentication failed.' on server 10.10.10.10:27017. The full response is {"ok": 0.0, "errmsg": "Authentication failed.", "code": 18, "codeName": "AuthenticationFailed"}
spring:
data:
mongodb:
uri: mongodb://test:test@10.10.10.10:27017/test
问题分析:创建了test的mongo数据库。
但是未创建test的用户导致
给test数据库创建test用户名和test密码后解决