Spring manages mongoDB connections - Shenkeng problem

 Hey, it took me two days to waste my time. I used the db database by default before, and I didn't find any problems. Later, I needed to use a different database instance, and then I found the problem of the gods when spring integrates mongo!

     一直在上报Command failed with error 13:‘not authorized on db to execute command ’

     I was dizzy, I always thought it was a problem with the account allocation of the mongo database, but after repeated tests, I found that the problem is not here, hey, I carefully read the abnormal information and found the key point not authorized on db, I am obviously not using db The database, the prompt here is instead the db database authentication, and began to suspect and track the source code discovery. . . Hey, let's not talk about it, let's take a screenshot to show the solution



 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326270947&siteId=291194637