spring.data.mongodb.uri=mongodb://user:password@host:port/database?authSource=admin
위와 같이 ?authSource=admin
을 넣으니 동작
For a standalone that enforces access control:
mongodb://myDBReader:D1fficultP%40ssw0rd@mongodb0.example.com:27017/?authSource=admin
https://stackoverflow.com/questions/23619018/mongodb-not-authorized-for-query-code-13