springboot之mongoDB项目Exception in monitor thread while connecting to server localhost:27017
来源:互联网 发布:联通 暂停数据流量 编辑:程序博客网 时间:2024/06/04 00:22
今天做好项目在自己电脑上测试均正常,但是部署到服务器上总是报
查看上面内容发现我的数据库明明已经链接成功了
想了想 是数据库配置链接了2次,因为我自己写了mongoDB的链接bean,而springboot又自动配置了一遍,而报错的是springboot自己配置的。
解决办法:
1、@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
2、移除<!-<dependency> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
换成:<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver</artifactId>
<version>3.4.2</version>
</dependency>
阅读全文
0 0
- springboot之mongoDB项目Exception in monitor thread while connecting to server localhost:27017
- org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017
- Hadoop 错误 Problem connecting to server: localhost/127.0.0.1:9000
- ADO.NET 之Connecting to SQL Server
- mongodb Failed: error connecting to db server: no reachable servers
- Connecting to Sybase Server
- Problem in connecting VS 2005 to SQL Server 2008
- Connecting to LDAP server using JNDI in Java
- hadoop异常:hdfs.server.datanode.DataNode: Problem connecting to server: localhost/127.0.0.1:8020
- Error connecting to server localhost on port 1527 with message Connection refused
- Ambari界面Presto重启报错ERROR:presto_client:Error connecting to presto server at: localhost:8285
- Connecting to my online server
- Error connecting to MySQL server
- RemoteException occurred in server thread; nested exception is:
- Exception in thread "main" java.sql.SQLException: Access denied for user ''@'localhost' (using passw
- Exception in thread “main” java.lang.IllegalArgumentException: Wrong FS: hdfs://localhost:9000/user/
- Exception in thread "main" java.sql.SQLException: Access denied for user 'root'@'localhost' (using p
- Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://localhost:9000/user/
- ArcGis for Android shp
- c#--类型参考表
- 【深度干货】2017年深度学习优化算法研究亮点最新综述(附slide下载)
- ThreadLocal设计模式
- js 运算保留小数位
- springboot之mongoDB项目Exception in monitor thread while connecting to server localhost:27017
- java中的匿名内部类总结
- pgpool authentication问题
- 使用ScriptableWizard创建编辑窗口 实现格子创建
- js 中实现 汉字按拼音排序
- mysql数据库下载安装配置 详细说明 附赠:网盘资源
- linux vmstat命令
- bzoj 1212 [HNOI2004]L语言
- code force 449 div2 C. Nephren gives a riddle