Browse Source

Rename Embedded Mongo configuration prefix to spring.mongodb.embedded

Previously, the prefix was spring.embedded-mongodb. This was
inconsistent with the prefixes for Artermis and HornetQ which are
spring.artemis.embedded and spring.hornetq.embedded respectively.

See gh-2002
pull/3494/merge
Andy Wilkinson 11 years ago
parent
commit
352ff4e899
  1. 2
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoProperties.java
  2. 4
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java
  3. 4
      spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

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

@ -30,7 +30,7 @@ import de.flapdoodle.embed.mongo.distribution.Feature; @@ -30,7 +30,7 @@ import de.flapdoodle.embed.mongo.distribution.Feature;
* @author Andy Wilkinson
* @since 1.3.0
*/
@ConfigurationProperties(prefix = "spring.embedded-mongodb")
@ConfigurationProperties(prefix = "spring.mongodb.embedded")
public class EmbeddedMongoProperties {
/**

4
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfigurationTests.java

@ -73,7 +73,7 @@ public class EmbeddedMongoAutoConfigurationTests { @@ -73,7 +73,7 @@ public class EmbeddedMongoAutoConfigurationTests {
this.context = new AnnotationConfigApplicationContext();
int mongoPort = findAvailableTcpPort();
addEnvironment(this.context, "spring.data.mongodb.port=" + mongoPort,
"spring.embedded-mongodb.features=TEXT_SEARCH, SYNC_DELAY");
"spring.mongodb.embedded.features=TEXT_SEARCH, SYNC_DELAY");
this.context.register(EmbeddedMongoAutoConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(EmbeddedMongoProperties.class).getFeatures(),
@ -100,7 +100,7 @@ public class EmbeddedMongoAutoConfigurationTests { @@ -100,7 +100,7 @@ public class EmbeddedMongoAutoConfigurationTests {
int mongoPort = findAvailableTcpPort();
addEnvironment(this.context, "spring.data.mongodb.port=" + mongoPort);
if (configuredVersion != null) {
addEnvironment(this.context, "spring.embedded-mongodb.version="
addEnvironment(this.context, "spring.mongodb.embedded.version="
+ configuredVersion);
}
this.context.register(MongoAutoConfiguration.class,

4
spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

@ -335,8 +335,8 @@ content into your application; rather pick only the properties that you need. @@ -335,8 +335,8 @@ content into your application; rather pick only the properties that you need.
spring.data.mongodb.field-naming-strategy= # fully qualified name of the FieldNamingStrategy to use
# EMBEDDED MONGODB ({sc-spring-boot-autoconfigure}/mongo/embedded/EmbeddedMongoProerties.{sc-ext}[EmbeddedMongoProperties])
spring.embedded-mongodb.version=2.6.10 # version of Mongo to use
spring.embedded-mongodb.features=SYNC_DELAY # comma-separated list of features to enable
spring.mongodb.embedded.version=2.6.10 # version of Mongo to use
spring.mongodb.embedded.features=SYNC_DELAY # comma-separated list of features to enable
# JPA ({sc-spring-boot-autoconfigure}/orm/jpa/JpaBaseConfiguration.{sc-ext}[JpaBaseConfiguration], {sc-spring-boot-autoconfigure}/orm/jpa/HibernateJpaAutoConfiguration.{sc-ext}[HibernateJpaAutoConfiguration])
spring.jpa.properties.*= # properties to set on the JPA connection

Loading…
Cancel
Save