错误代码: Caused by: java.lang.IllegalStateException: Invalid mongo configuration, either uri or host/port/credentials must be specified
使用application.properties配置如下:
spring.data.mongo.host=127.0.0.1 spring.data.mongo.port=27017 spring.data.mongo.username=*** spring.data.mongo.password=*** spring.data.mongo.database=***
需要改成spring.data.mongodb.host=127.0.0.1 spring.data.mongodb.port=27017 spring.data.mongodb.username=*** spring.data.mongodb.password=*** spring.data.mongodb.database=***
mongodb安装的版本是3.2.10
如果配置
spring.data.mongodb.uri=mongodb://***:111@127.0.0.1:27017/***
启动会报错 Invalid mongo configuration, either uri or host/port/credentials must be specified
还没找到解决办法,有谁知道,指教一下
spring boot 集成mongodb 启动报错
最新推荐文章于 2024-08-31 18:14:24 发布