Skip to content

Commit 13403a0

Browse files
committed
Merge pull request #6203 from julien-may:1.3.x
* pr/6203: Polish "Add condition on MongoClientFactoryBean" Add condition on MongoClientFactoryBean
2 parents 17f8a24 + 7a5fabf commit 13403a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2015 the original author or authors.
2+
* Copyright 2012-2016 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.
@@ -63,6 +63,7 @@
6363
import org.springframework.core.env.MapPropertySource;
6464
import org.springframework.core.env.MutablePropertySources;
6565
import org.springframework.core.env.PropertySource;
66+
import org.springframework.data.mongodb.core.MongoClientFactoryBean;
6667
import org.springframework.util.Assert;
6768

6869
/**
@@ -199,7 +200,7 @@ private Map<String, Object> getMongoPorts(MutablePropertySources sources) {
199200
* {@code embeddedMongoServer} bean.
200201
*/
201202
@Configuration
202-
@ConditionalOnClass(MongoClient.class)
203+
@ConditionalOnClass({ MongoClient.class, MongoClientFactoryBean.class })
203204
protected static class EmbeddedMongoDependencyConfiguration
204205
extends MongoClientDependsOnBeanFactoryPostProcessor {
205206

0 commit comments

Comments
 (0)