第一种方式是使用properties进行mongoDB的连接配置 第二种方式是创建配置类进行mongoDB的连接配置 https://blog.csdn.net/newCheng/article/details/77747492