Repository: springdoc/springdoc-openapi
Pull request #450 (2020-02-19 22:37:59)

Add missing @ConditionalOnMissingBean annotations
 Add missing @ConditionalOnMissingBean annotations  to allow users to override the bean


Patch:
diff --git a/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/MultipleOpenApiWebFluxConfiguration.java b/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/MultipleOpenApiWebFluxConfiguration.java
index 170b86ee5..6675cef86 100644
--- a/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/MultipleOpenApiWebFluxConfiguration.java
+++ b/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/MultipleOpenApiWebFluxConfiguration.java
@@ -24,6 +24,7 @@ import org.springdoc.api.MultipleOpenApiResource;
 
 import org.springframework.beans.factory.ObjectFactory;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
 import org.springframework.context.annotation.Bean;
@@ -35,11 +36,11 @@ import static org.springdoc.core.Constants.SPRINGDOC_ENABLED;
 
 @Configuration
 @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
-@ConditionalOnBean(GroupedOpenApi.class)
 @ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true)
 public class MultipleOpenApiWebFluxConfiguration {
 
-	@Bean
+	@Bean(name = "multipleWebfluxOpenApiResource")
+	@ConditionalOnMissingBean(name = "multipleWebfluxOpenApiResource")
 	public MultipleOpenApiResource multipleOpenApiResource(List<GroupedOpenApi> groupedOpenApis,
 			ObjectFactory<OpenAPIBuilder> defaultOpenAPIBuilder, AbstractRequestBuilder requestBuilder,
 			GenericResponseBuilder responseBuilder, OperationBuilder operationParser,
@@ -49,4 +50,4 @@ public class MultipleOpenApiWebFluxConfiguration {
 				responseBuilder, operationParser,
 				requestMappingHandlerMapping,springDocConfigProperties);
 	}
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/SpringDocWebFluxConfiguration.java b/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/SpringDocWebFluxConfiguration.java
index ba72bd7fe..0c67fa059 100644
--- a/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/SpringDocWebFluxConfiguration.java
+++ b/springdoc-openapi-webflux-core/src/main/java/org/springdoc/core/SpringDocWebFluxConfiguration.java
@@ -42,7 +42,8 @@ import static org.springdoc.core.Constants.SPRINGDOC_ENABLED;
 @ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true)
 public class SpringDocWebFluxConfiguration {
 
-	@Bean
+	@Bean(name = "webfluxOpenApiResource")
+	@ConditionalOnMissingBean(name = "webfluxOpenApiResource")
 	public OpenApiResource openApiResource(OpenAPIBuilder openAPIBuilder, AbstractRequestBuilder requestBuilder,
 			GenericResponseBuilder responseBuilder, OperationBuilder operationParser,
 			RequestMappingInfoHandlerMapping requestMappingHandlerMapping,
diff --git a/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/MultipleOpenApiSupportConfiguration.java b/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/MultipleOpenApiSupportConfiguration.java
index dfeadcd3c..e5f80f450 100644
--- a/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/MultipleOpenApiSupportConfiguration.java
+++ b/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/MultipleOpenApiSupportConfiguration.java
@@ -26,6 +26,7 @@ import org.springdoc.api.MultipleOpenApiResource;
 
 import org.springframework.beans.factory.ObjectFactory;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
 import org.springframework.context.annotation.Bean;
@@ -41,7 +42,8 @@ import static org.springdoc.core.Constants.SPRINGDOC_ENABLED;
 @ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true)
 public class MultipleOpenApiSupportConfiguration {
 
-	@Bean
+	@Bean(name = "multipleMvcOpenApiResource")
+	@ConditionalOnMissingBean(name = "multipleMvcOpenApiResource")
 	public MultipleOpenApiResource multipleOpenApiResource(List<GroupedOpenApi> groupedOpenApis,
 			ObjectFactory<OpenAPIBuilder> defaultOpenAPIBuilder, AbstractRequestBuilder requestBuilder,
 			GenericResponseBuilder responseBuilder, OperationBuilder operationParser,
@@ -52,4 +54,4 @@ public class MultipleOpenApiSupportConfiguration {
 				responseBuilder, operationParser,
 				requestMappingHandlerMapping, servletContextProvider,springDocConfigProperties);
 	}
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/SpringDocWebMvcConfiguration.java b/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/SpringDocWebMvcConfiguration.java
index e7677e63a..4b0b62bf9 100644
--- a/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/SpringDocWebMvcConfiguration.java
+++ b/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/SpringDocWebMvcConfiguration.java
@@ -47,7 +47,8 @@ import static org.springdoc.core.Constants.SPRINGDOC_SHOW_ACTUATOR;
 @ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true)
 public class SpringDocWebMvcConfiguration {
 
-	@Bean
+	@Bean(name = "mvcOpenApiResource")
+	@ConditionalOnMissingBean(name = "mvcOpenApiResource")
 	public OpenApiResource openApiResource(OpenAPIBuilder openAPIBuilder, AbstractRequestBuilder requestBuilder,
 			GenericResponseBuilder responseBuilder, OperationBuilder operationParser,
 			RequestMappingInfoHandlerMapping requestMappingHandlerMapping, Optional<ActuatorProvider> servletContextProvider,


Test patch:
diff --git a/springdoc-openapi-kotlin/src/test/java/test/org/springdoc/api/app1/SpringDocTestApp.java b/springdoc-openapi-kotlin/src/test/java/test/org/springdoc/api/app1/SpringDocTestApp.java
index f16e3284d..2388d5f03 100644
--- a/springdoc-openapi-kotlin/src/test/java/test/org/springdoc/api/app1/SpringDocTestApp.java
+++ b/springdoc-openapi-kotlin/src/test/java/test/org/springdoc/api/app1/SpringDocTestApp.java
@@ -28,7 +28,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 
 @SpringBootApplication
-@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app1" })
+@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app1" })
 public class SpringDocTestApp {
 	public static void main(String[] args) {
 		SpringApplication.run(SpringDocTestApp.class, args);
diff --git a/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app2/SpringDocApp2Test.kt b/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app2/SpringDocApp2Test.kt
index 5ea3f3b82..bbc9fd148 100644
--- a/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app2/SpringDocApp2Test.kt
+++ b/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app2/SpringDocApp2Test.kt
@@ -22,10 +22,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
 import org.springframework.context.annotation.ComponentScan
 import test.org.springdoc.api.AbstractKotlinSpringDocTest
 
-@ComponentScan(basePackages = ["org.springdoc", "test.org.springdoc.api.app2"])
+@ComponentScan(basePackages = ["org.springdoc.core", "test.org.springdoc.api.app2"])
 class SpringDocApp2Test : AbstractKotlinSpringDocTest() {
 
 	@SpringBootApplication
 	open class DemoApplication
 
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app3/SpringDocApp3Test.kt b/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app3/SpringDocApp3Test.kt
index 87cf4d5d9..0969aa997 100644
--- a/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app3/SpringDocApp3Test.kt
+++ b/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app3/SpringDocApp3Test.kt
@@ -22,10 +22,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
 import org.springframework.context.annotation.ComponentScan
 import test.org.springdoc.api.AbstractKotlinSpringDocTest
 
-@ComponentScan(basePackages = ["org.springdoc", "test.org.springdoc.api.app3"])
+@ComponentScan(basePackages = ["org.springdoc.core", "test.org.springdoc.api.app3"])
 class SpringDocApp3Test : AbstractKotlinSpringDocTest() {
 
 	@SpringBootApplication
 	open class DemoApplication
 
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app4/SpringDocApp4Test.kt b/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app4/SpringDocApp4Test.kt
index de2639afb..0c78a0f86 100644
--- a/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app4/SpringDocApp4Test.kt
+++ b/springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app4/SpringDocApp4Test.kt
@@ -22,10 +22,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
 import org.springframework.context.annotation.ComponentScan
 import test.org.springdoc.api.AbstractKotlinSpringDocTest
 
-@ComponentScan(basePackages = ["org.springdoc", "test.org.springdoc.api.app4"])
+@ComponentScan(basePackages = ["org.springdoc.core", "test.org.springdoc.api.app4"])
 class SpringDocApp4Test : AbstractKotlinSpringDocTest() {
 
 	@SpringBootApplication
 	open class DemoApplication
 
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app3/SpringDocTestApp.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app3/SpringDocTestApp.java
index 6262f30d7..a0387473e 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app3/SpringDocTestApp.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app3/SpringDocTestApp.java
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 
 @SpringBootApplication
-@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app3" })
+@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app3" })
 public class SpringDocTestApp {
 	public static void main(String[] args) {
 		SpringApplication.run(SpringDocTestApp.class, args);
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java
index e0a2abd14..a2b42f71e 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 
 @SpringBootApplication
-@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app39" })
+@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app39" })
 public class SpringDocTestApp {
 
 	public static void main(String[] args) {
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app4/SpringDocTestApp.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app4/SpringDocTestApp.java
index 22ae0f622..c60894f02 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app4/SpringDocTestApp.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app4/SpringDocTestApp.java
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 
 @SpringBootApplication
-@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app4" })
+@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app4" })
 public class SpringDocTestApp {
 	public static void main(String[] args) {
 		SpringApplication.run(SpringDocTestApp.class, args);
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app5/SpringDocTestApp.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app5/SpringDocTestApp.java
index df9ec8b30..c85e58464 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app5/SpringDocTestApp.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app5/SpringDocTestApp.java
@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 
 @SpringBootApplication
-@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app5" })
+@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app5" })
 public class SpringDocTestApp {
 	public static void main(String[] args) {
 		SpringApplication.run(SpringDocTestApp.class, args);
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java
index 5900c04d9..68ab4515a 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java
@@ -38,6 +38,6 @@ public class SpringDocApp63Test extends AbstractSpringDocTest {
 	}
 
 	@SpringBootApplication
-	@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app63" })
+	@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app63" })
 	static class SpringDocTestApp {}
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java
index 7727f1076..9760773f0 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java
@@ -38,6 +38,6 @@ public class SpringDocApp64Test extends AbstractSpringDocTest {
 	}
 
 	@SpringBootApplication
-	@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app64" })
+	@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app64" })
 	static class SpringDocTestApp {}
 }
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java
index 67e2721fc..8cbfc963c 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java
@@ -26,6 +26,6 @@ import org.springframework.context.annotation.ComponentScan;
 public class SpringDocApp65Test extends AbstractSpringDocTest {
 
 	@SpringBootApplication
-	@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app65" })
+	@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app65" })
 	static class SpringDocTestApp {}
 }
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app66/SpringDocTestApp.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app66/SpringDocTestApp.java
index 994a25484..cf5f13e4f 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app66/SpringDocTestApp.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app66/SpringDocTestApp.java
@@ -25,13 +25,17 @@ import io.swagger.v3.oas.models.info.License;
 import io.swagger.v3.oas.models.security.SecurityScheme;
 import org.springdoc.core.GroupedOpenApi;
 
+import org.springdoc.core.MultipleOpenApiWebFluxConfiguration;
 import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
 
 @SpringBootApplication
-@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app66" })
+@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app66" })
 public class SpringDocTestApp {
 	public static void main(String[] args) {
 		SpringApplication.run(SpringDocTestApp.class, args);
@@ -47,7 +51,8 @@ public class SpringDocTestApp {
 	}
 
 	@Bean
-	public GroupedOpenApi stramOpenApi() {
+	@Order(Ordered.HIGHEST_PRECEDENCE)
+	public GroupedOpenApi streamOpenApi() {
 		String[] paths = { "/stream/**" };
 		String[] packagedToMatch = { "test.org.springdoc.api.app66" };
 		return GroupedOpenApi.builder().setGroup("stream").pathsToMatch(paths)
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java
index 5461bbdc5..ac965a7e6 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java
@@ -28,7 +28,7 @@ import org.springframework.context.annotation.ComponentScan;
 public class SpringDocApp67Test extends AbstractSpringDocTest {
 
 	@SpringBootApplication
-	@ComponentScan(basePackages = { "org.springdoc", "test.org.springdoc.api.app67" })
+	@ComponentScan(basePackages = { "org.springdoc.core", "test.org.springdoc.api.app67" })
 	static class SpringDocTestApp {}
 
 	@Test
diff --git a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java
index a2d2cd0b3..e43d064f0 100644
--- a/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java
+++ b/springdoc-openapi-webflux-core/src/test/java/test/org/springdoc/api/core/ReactiveAutoConfigurationTest.java
@@ -37,7 +37,7 @@ public class ReactiveAutoConfigurationTest {
 		contextRunner
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.hasBean("openApiResource"));
+						.hasBean("webfluxOpenApiResource"));
 	}
 
 	@Test
@@ -46,7 +46,7 @@ public class ReactiveAutoConfigurationTest {
 				.withUserConfiguration(TestApp.class)
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.doesNotHaveBean("openApiResource"));
+						.doesNotHaveBean("webfluxOpenApiResource"));
 	}
 
 	@Test
@@ -55,7 +55,7 @@ public class ReactiveAutoConfigurationTest {
 				.withPropertyValues("springdoc.api-docs.enabled=false")
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.doesNotHaveBean("openApiResource"));
+						.doesNotHaveBean("webfluxOpenApiResource"));
 	}
 
 	@Test
@@ -64,11 +64,11 @@ public class ReactiveAutoConfigurationTest {
 				.withClassLoader(new FilteredClassLoader("org.springframework.web.reactive.HandlerResult"))
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.doesNotHaveBean("openApiResource"));
+						.doesNotHaveBean("webfluxOpenApiResource"));
 
 	}
 
 	@SpringBootApplication
 	static class TestApp {
 	}
-}
\ No newline at end of file
+}
diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java
index a64030115..bab253fc1 100644
--- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java
+++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java
@@ -40,9 +40,9 @@ public class BlockingAutoConfigurationTest {
 				.withPropertyValues("springdoc.show-actuator=true")
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.hasBean("openApiResource")
+						.hasBean("mvcOpenApiResource")
 						.hasBean("actuatorProvider")
-						.hasBean("multipleOpenApiResource")
+						.hasBean("multipleMvcOpenApiResource")
 				);
 	}
 
@@ -52,9 +52,9 @@ public class BlockingAutoConfigurationTest {
 				.withUserConfiguration(TestApp.class)
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.doesNotHaveBean("openApiResource")
+						.doesNotHaveBean("mvcOpenApiResource")
 						.doesNotHaveBean("actuatorProvider")
-						.doesNotHaveBean("multipleOpenApiResource")
+						.doesNotHaveBean("multipleMvcOpenApiResource")
 				);
 	}
 
@@ -63,9 +63,9 @@ public class BlockingAutoConfigurationTest {
 		contextRunner
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.hasBean("openApiResource")
+						.hasBean("mvcOpenApiResource")
 						.doesNotHaveBean("actuatorPprrovider")
-						.hasBean("multipleOpenApiResource")
+						.hasBean("multipleMvcOpenApiResource")
 				);
 	}
 
@@ -75,9 +75,9 @@ public class BlockingAutoConfigurationTest {
 				.withPropertyValues("springdoc.api-docs.enabled=false")
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.doesNotHaveBean("openApiResource")
+						.doesNotHaveBean("mvcOpenApiResource")
 						.doesNotHaveBean("actuatorProvider")
-						.doesNotHaveBean("multipleOpenApiResource")
+						.doesNotHaveBean("multipleMvcOpenApiResource")
 				);
 	}
 
@@ -87,9 +87,9 @@ public class BlockingAutoConfigurationTest {
 				.withClassLoader(new FilteredClassLoader("org.springframework.web.context.support.GenericWebApplicationContext"))
 				.run(context -> assertThat(context)
 						.hasNotFailed()
-						.doesNotHaveBean("openApiResource")
+						.doesNotHaveBean("mvcOpenApiResource")
 						.doesNotHaveBean("actuatorProvider")
-						.doesNotHaveBean("multipleOpenApiResource")
+						.doesNotHaveBean("multipleMvcOpenApiResource")
 				);
 
 	}
@@ -104,4 +104,4 @@ public class BlockingAutoConfigurationTest {
 					.build();
 		}
 	}
-}
\ No newline at end of file
+}