Merge pull request #6203 from julien-may:1.3.x

* pr/6203:
  Polish "Add condition on MongoClientFactoryBean"
  Add condition on MongoClientFactoryBean
This commit is contained in:
Stephane Nicoll 2016-06-27 14:56:03 +02:00
commit 13403a0f72
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2012-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -63,6 +63,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.MapPropertySource;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertySource;
import org.springframework.data.mongodb.core.MongoClientFactoryBean;
import org.springframework.util.Assert;
/**
@ -199,7 +200,7 @@ public class EmbeddedMongoAutoConfiguration {
* {@code embeddedMongoServer} bean.
*/
@Configuration
@ConditionalOnClass(MongoClient.class)
@ConditionalOnClass({ MongoClient.class, MongoClientFactoryBean.class })
protected static class EmbeddedMongoDependencyConfiguration
extends MongoClientDependsOnBeanFactoryPostProcessor {