springBoot -mongodb 小坑

 

SpringBoot2.0 整合  mongodb  启动报错

om/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class

解决方法 :

 我改成了1.5 的 同时 添加了 一条 依赖 

testCompile group: 'com.h2database', name: 'h2', version: '1.4.197'

问题解决了

 

查询报错   Can't find a codec for class org.bson.BsonDecimal128.

mongodb版本过低

 

posted @ 2018-11-07 16:18  打代码的小超人  阅读(1174)  评论(0编辑  收藏  举报