Spring Boot Standard UUID编解码器不适用于AbstractMongoClientConfiguration

Spring Boot Standard UUID编解码器不适用于AbstractMongoClientConfiguration,第1张

Spring Boot Standard UUID编解码器不适用于AbstractMongoClientConfiguration

我找到了解决问题的办法。该

new UuidCodec(UuidRepresentation.STANDARD)
需求是在第一的位置。我的代码如下所示:

    private static final CodecRegistry CODEC_REGISTRY = CodecRegistries.fromProviders(        Arrays.asList(new UuidCodecProvider(UuidRepresentation.STANDARD),new ValueCodecProvider(),new BsonValueCodecProvider(),new DBRefCodecProvider(),new DBObjectCodecProvider(),new documentCodecProvider(new documentToDBRefTransformer()),new IterableCodecProvider(new documentToDBRefTransformer()),new MapCodecProvider(new documentToDBRefTransformer()),new GeoJsonCodecProvider(),new GridFSFileCodecProvider(),new Jsr310CodecProvider(),new BsonCodecProvider()));

这种行为不是很好,并且可能是一个错误。希望对您有所帮助。



欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5641598.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-16
下一篇2022-12-16

发表评论

登录后才能评论

评论列表(0条)

    保存