Skip to content

Commit e24c17d

Browse files
committed
Polish "Add auto-configuration support for ReactiveGridFsTemplate"
Closes gh-16467
1 parent d9c9ed1 commit e24c17d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveDataAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public MappingMongoConverter mappingMongoConverter(MongoMappingContext context,
9191

9292
@Bean
9393
@ConditionalOnMissingBean
94-
public DataBufferFactory dataBufferFactory() {
94+
public DefaultDataBufferFactory dataBufferFactory() {
9595
return new DefaultDataBufferFactory();
9696
}
9797

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/mongo/MongoReactiveDataAutoConfigurationTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -47,6 +47,12 @@ public void templateExists() {
4747
.hasSingleBean(ReactiveMongoTemplate.class));
4848
}
4949

50+
@Test
51+
public void gridFsTemplateExists() {
52+
this.contextRunner.run((context) -> assertThat(context)
53+
.hasSingleBean(ReactiveGridFsTemplate.class));
54+
}
55+
5056
@Test
5157
public void backsOffIfMongoClientBeanIsNotPresent() {
5258
ApplicationContextRunner runner = new ApplicationContextRunner()
@@ -57,10 +63,4 @@ public void backsOffIfMongoClientBeanIsNotPresent() {
5763
.doesNotHaveBean(MongoReactiveDataAutoConfiguration.class));
5864
}
5965

60-
@Test
61-
public void gridFsTemplateExists() {
62-
this.contextRunner.run((context) -> assertThat(context)
63-
.hasSingleBean(ReactiveGridFsTemplate.class));
64-
}
65-
6666
}

0 commit comments

Comments
 (0)