我刚刚使用具有mongoDB-reactive
依赖关系的 Spring Tool Suite 创建了一个非常基本的 Spring Boot 项目并运行该应用程序,但是,我不断收到以下异常
2019-11-27 00:31:19.699 INFO 11988 --- [localhost:27017] org.mongodb.driver.cluster:连接到服务器 localhost:27017 时监控线程出现异常
com.mongodb.MongoSocketOpenException:在 com.mongodb.connection.netty.NettyStream$OpenChannelFutureListener.operationComplete(NettyStream.java:410) ~[mongodb-driver-core-3.11.2.jar:na] 处打开套接字的异常
我正在使用 Spring Boot (2.2.1.RELEASE)
在里面applications.properties
我添加了以下行
spring.data.mongodb.uri=mongodb://localhost:27017/testdb
我错过了什么?