From 798229f530d67277340cb539a564d44fecb4e18f Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 18 Mar 2014 11:15:15 -0700 Subject: [PATCH] Document rabbit.addresses property --- .../boot/autoconfigure/amqp/RabbitProperties.java | 9 +++++---- .../boot/autoconfigure/amqp/RabbitPropertiesTests.java | 4 +++- .../main/asciidoc/appendix-application-properties.adoc | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java index 2d177b96f0..9241f64667 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java @@ -23,6 +23,7 @@ import org.springframework.util.StringUtils; * Configuration properties for Rabbit. * * @author Greg Turnquist + * @author Dave Syer */ @ConfigurationProperties(name = "spring.rabbitmq") public class RabbitProperties { @@ -68,14 +69,14 @@ public class RabbitProperties { return this.port; } - public String getAddresses() { - return this.addresses == null ? this.host + ":" + this.port : this.addresses; - } - public void setAddresses(String addresses) { this.addresses = addresses; } + public String getAddresses() { + return (this.addresses == null ? this.host + ":" + this.port : this.addresses); + } + public void setPort(int port) { this.port = port; } diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java index 2c2adc2ce7..6864cd7b68 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/amqp/RabbitPropertiesTests.java @@ -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. @@ -21,6 +21,8 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; /** + * Tests for {@link RabbitProperties}. + * * @author Dave Syer */ public class RabbitPropertiesTests { diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index c169c3190a..638c208d6c 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -135,11 +135,13 @@ spring.jmx.enabled=true # Expose MBeans from Spring # RABBIT (RabbitProperties) spring.rabbitmq.host= # connection host spring.rabbitmq.port= # connection port +spring.rabbitmq.addresses= # connection addresses (e.g. myhost:9999,otherhost:1111) spring.rabbitmq.username= # login user spring.rabbitmq.password= # login password spring.rabbitmq.virtualhost= spring.rabbitmq.dynamic= + # REDIS (RedisProperties) spring.redis.host=localhost # server host spring.redis.password= # server password