Skip to content

Commit 7bfeb7a

Browse files
committed
Polish "Fix binding of spring.mongodb.representation.uuid"
See gh-47654
1 parent a10e4ba commit 7bfeb7a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

module/spring-boot-mongodb/src/test/java/org/springframework/boot/mongodb/autoconfigure/MongoAutoConfigurationTests.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.mongodb.client.internal.MongoClientImpl;
2727
import com.mongodb.connection.ClusterConnectionMode;
2828
import com.mongodb.connection.SslSettings;
29+
import org.bson.UuidRepresentation;
2930
import org.junit.jupiter.api.Test;
3031

3132
import org.springframework.boot.autoconfigure.AutoConfigurations;
@@ -231,6 +232,13 @@ void configuresCredentialsFromUriPropertyWithAuthDatabase() {
231232
});
232233
}
233234

235+
@Test
236+
void configureUUidRepresentation() {
237+
this.contextRunner.withPropertyValues("spring.mongodb.representation.uuid=standard")
238+
.run((context) -> assertThat(getSettings(context).getUuidRepresentation())
239+
.isEqualTo(UuidRepresentation.STANDARD));
240+
}
241+
234242
@Test
235243
void configuresSingleClient() {
236244
this.contextRunner.withUserConfiguration(FallbackMongoClientConfig.class)

0 commit comments

Comments
 (0)