Rename @ConfigurationProperties attributes

Rename `name` to `prefix` and `path` to `locations`.
This commit is contained in:
Phillip Webb
2014-03-24 11:43:41 -07:00
parent 07ad45c468
commit d42bedf295
36 changed files with 73 additions and 75 deletions

View File

@@ -25,7 +25,7 @@ import org.springframework.util.StringUtils;
* @author Greg Turnquist
* @author Dave Syer
*/
@ConfigurationProperties(name = "spring.rabbitmq")
@ConfigurationProperties(prefix = "spring.rabbitmq")
public class RabbitProperties {
private String host = "localhost";

View File

@@ -28,7 +28,7 @@ import org.springframework.util.StringUtils;
*
* @author Dave Syer
*/
@ConfigurationProperties(name = DataSourceAutoConfiguration.CONFIGURATION_PREFIX)
@ConfigurationProperties(prefix = DataSourceAutoConfiguration.CONFIGURATION_PREFIX)
@EnableConfigurationProperties
public abstract class AbstractDataSourceConfiguration implements BeanClassLoaderAware,
InitializingBean {

View File

@@ -23,7 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*
* @author Greg Turnquist
*/
@ConfigurationProperties(name = "spring.activemq")
@ConfigurationProperties(prefix = "spring.activemq")
public class ActiveMQProperties {
private String brokerUrl = "tcp://localhost:61616";

View File

@@ -18,7 +18,7 @@ package org.springframework.boot.autoconfigure.jms;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(name = "spring.jms")
@ConfigurationProperties(prefix = "spring.jms")
public class JmsTemplateProperties {
private boolean pubSubDomain = true;

View File

@@ -30,7 +30,7 @@ import com.mongodb.MongoClientURI;
* @author Dave Syer
* @author Phillip Webb
*/
@ConfigurationProperties(name = "spring.data.mongodb")
@ConfigurationProperties(prefix = "spring.data.mongodb")
public class MongoProperties {
private String host;

View File

@@ -23,7 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
*
* @author Dave Syer
*/
@ConfigurationProperties(name = "spring.redis")
@ConfigurationProperties(prefix = "spring.redis")
public class RedisProperties {
private String host = "localhost";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 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.
@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
*
* @author Dave Syer
*/
@ConfigurationProperties(name = "security", ignoreUnknownFields = false)
@ConfigurationProperties(prefix = "security", ignoreUnknownFields = false)
public class SecurityProperties implements SecurityPrequisite {
private boolean requireSsl;

View File

@@ -25,7 +25,7 @@ import org.springframework.http.converter.HttpMessageConverter;
* @author Dave Syer
* @author Piotr Maj
*/
@ConfigurationProperties(name = "http.mappers", ignoreUnknownFields = false)
@ConfigurationProperties(prefix = "http.mappers", ignoreUnknownFields = false)
public class HttpMapperProperties {
private boolean jsonPrettyPrint;

View File

@@ -44,7 +44,7 @@ import org.springframework.util.StringUtils;
*
* @author Dave Syer
*/
@ConfigurationProperties(name = "server", ignoreUnknownFields = false)
@ConfigurationProperties(prefix = "server", ignoreUnknownFields = false)
public class ServerProperties implements EmbeddedServletContainerCustomizer {
private Integer port;