MongoDB Java Inserting Throws org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class io.github.ilkgunel.mongodb.Pojo

前端 未结 8 785
渐次进展
渐次进展 2020-12-11 00:25

I\'m learning MongoDB with Java. I\'m trying to insert data to MongoDB with Java driver. I\'m doing inserting like in MongoDB tutorial and every thing is okey. But if I want

8条回答
  •  执笔经年
    2020-12-11 00:49

    You need to configure the CodeRegistry to use the PojoCodecProvider as explained here: http://mongodb.github.io/mongo-java-driver/3.7/driver/getting-started/quick-start-pojo/

提交回复
热议问题