Spring Boot Standard UUID codec not working with AbstractMongoClientConfiguration
I found a solution for the problem. The new UuidCodec(UuidRepresentation.STANDARD)
needs to be at the first position. My Code looks like following:
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()));
That behavior is not very nice and it is possibly a bug. Hope this helps some of you.