* This implementation is only suitable if an {@link Exception} raised from
* {@link #doHealthCheck(Health)} should create a {@link Status#DOWN} health status.
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Health.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Health.java
index 53314304c8c..3013eddd324 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Health.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Health.java
@@ -31,27 +31,24 @@ import com.fasterxml.jackson.annotation.JsonUnwrapped;
/**
* Value object used to carry information about the health information of a component or
* subsystem.
- *
*
* {@link Health} contains a {@link Status} to express the state of a component or
* subsystem and some additional details to carry some contextual information.
- *
*
* {@link Health} has a fluent API to make it easy to construct instances. Typical usage
* in a {@link HealthIndicator} would be:
*
- *
- * Health health = new Health();
- * try {
- * // do some test to determine state of component
- *
- * health.up().withDetail("version", "1.1.2");
- * }
- * catch (Exception ex) {
- * health.down().withException(ex);
- * }
- * return health;
- *
+ *
details;
public Health() {
- this(Status.UNKOWN);
+ this(Status.UNKNOWN);
}
public Health(Status status) {
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthAggregator.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthAggregator.java
index 3bfc7ba9944..e94227b1c0d 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthAggregator.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthAggregator.java
@@ -21,13 +21,11 @@ import java.util.Map;
/**
* Strategy interface used by {@link CompositeHealthIndicator} to aggregate {@link Health}
* instances into a final one.
- *
*
* This is especially useful to combine subsystem states expressed through
* {@link Health#getStatus()} into one state for the entire system. The default
* implementation {@link OrderedHealthAggregator} sorts {@link Status} instances based on
* a priority list.
- *
*
* It is possible to add more complex {@link Status} types to the system. In that case
* either the {@link OrderedHealthAggregator} needs to be properly configured or users
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java
index b12fb198408..38196deb7ab 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java
@@ -21,38 +21,64 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
+import org.springframework.util.Assert;
+
/**
* Default {@link HealthAggregator} implementation that aggregates {@link Health}
* instances and determines the final system state based on a simple ordered list.
- *
*
* If a different order is required or a new {@link Status} type will be used, the order
* can be set by calling {@link #setStatusOrder(List)}.
- *
+ *
* @author Christian Dupuis
* @since 1.1.0
*/
public class OrderedHealthAggregator extends AbstractHealthAggregator {
- private List statusOrder = Arrays.asList("DOWN", "OUT_OF_SERVICE", "UP",
- "UNKOWN");
+ private List statusOrder;
+
+ /**
+ * Create a new {@link OrderedHealthAggregator} instance.
+ */
+ public OrderedHealthAggregator() {
+ setStatusOrder(Status.DOWN, Status.OUT_OF_SERVICE, Status.UP, Status.UNKNOWN);
+ }
+
+ /**
+ * Set the ordering of the status.
+ * @param statusOrder an ordered list of the status
+ */
+ public void setStatusOrder(Status... statusOrder) {
+ String[] order = new String[statusOrder.length];
+ for (int i = 0; i < statusOrder.length; i++) {
+ order[i] = statusOrder[i].getCode();
+ }
+ setStatusOrder(Arrays.asList(order));
+ }
+ /**
+ * Set the ordering of the status.
+ * @param statusOrder an ordered list of the status codes
+ */
public void setStatusOrder(List statusOrder) {
+ Assert.notNull(statusOrder, "StatusOrder must not be null");
this.statusOrder = statusOrder;
}
@Override
protected Status aggregateStatus(List status) {
- // If no status is given return UNKOWN
+ // If no status is given return UNKNOWN
if (status.size() == 0) {
- return Status.UNKOWN;
+ return Status.UNKNOWN;
}
-
// Sort given Status instances by configured order
Collections.sort(status, new StatusComparator(this.statusOrder));
return status.get(0);
}
+ /**
+ * {@link Comparator} used to order {@link Status}.
+ */
private class StatusComparator implements Comparator {
private final List statusOrder;
@@ -63,8 +89,9 @@ public class OrderedHealthAggregator extends AbstractHealthAggregator {
@Override
public int compare(Status s1, Status s2) {
- return Integer.valueOf(this.statusOrder.indexOf(s1.getCode())).compareTo(
- Integer.valueOf(this.statusOrder.indexOf(s2.getCode())));
+ int i1 = this.statusOrder.indexOf(s1.getCode());
+ int i2 = this.statusOrder.indexOf(s2.getCode());
+ return (i1 < i2 ? -1 : (i1 == i2 ? s1.getCode().compareTo(s2.getCode()) : 1));
}
}
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Status.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Status.java
index 34566edbc51..3c0ce292e1f 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Status.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/Status.java
@@ -25,11 +25,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Value object to express state of a component or subsystem.
- *
*
* Status provides convenient constants for commonly used states like {@link #UP},
* {@link #DOWN} or {@link #OUT_OF_SERVICE}.
- *
*
* Custom states can also be created and used throughout the Spring Boot Health subsystem.
*
@@ -42,7 +40,7 @@ public class Status {
/**
* Convenient constant value representing unknown state
*/
- public static final Status UNKOWN = new Status("UNKOWN");
+ public static final Status UNKNOWN = new Status("UNKNOWN");
/**
* Convenient constant value representing up state
@@ -63,10 +61,19 @@ public class Status {
private final String description;
+ /**
+ * Create a new {@link Status} instance with the given code and an empty description.
+ * @param code the status code
+ */
public Status(String code) {
this(code, "");
}
+ /**
+ * Create a new {@link Status} instance with the given code and description.
+ * @param code the status code
+ * @param description a description of the status
+ */
public Status(String code, String description) {
Assert.notNull(code, "Code must not be null");
Assert.notNull(description, "Description must not be null");
@@ -74,16 +81,32 @@ public class Status {
this.description = description;
}
+ /**
+ * @return the code for this status
+ */
@JsonProperty("status")
public String getCode() {
return this.code;
}
+ /**
+ * @return the description of this status
+ */
@JsonInclude(Include.NON_EMPTY)
public String getDescription() {
return this.description;
}
+ @Override
+ public String toString() {
+ return this.code;
+ }
+
+ @Override
+ public int hashCode() {
+ return this.code.hashCode();
+ }
+
@Override
public boolean equals(Object obj) {
if (obj == this) {
@@ -95,8 +118,4 @@ public class Status {
return false;
}
- @Override
- public int hashCode() {
- return this.code.hashCode();
- }
-}
\ No newline at end of file
+}
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporter.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporter.java
index 21ab5614854..7df8450372f 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporter.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporter.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.
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/MultiMetricRepository.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/MultiMetricRepository.java
index 2513b73f08f..ae67507b468 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/MultiMetricRepository.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/repository/MultiMetricRepository.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.
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReader.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReader.java
index ea6156a2343..f284ab55fc9 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReader.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReader.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2015 the original author or authors.
+ * Copyright 2014-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.
@@ -29,7 +29,6 @@ import org.springframework.boot.actuate.metrics.repository.MultiMetricRepository
* has been populated using that exporter.
*
* @author Dave Syer
- *
* @since 1.1.0
*/
public class MultiMetricRichGaugeReader implements RichGaugeReader {
diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/PrefixMetricWriter.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/PrefixMetricWriter.java
index d358acc8050..356b1f9bde6 100644
--- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/PrefixMetricWriter.java
+++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/writer/PrefixMetricWriter.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.
@@ -25,6 +25,7 @@ import org.springframework.boot.actuate.metrics.Metric;
* name prefix (their group name).
*
* @author Dave Syer
+ * @since 1.1.0
*/
public interface PrefixMetricWriter {
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
index 33e7a8d4dbb..80e4583b648 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
@@ -33,7 +33,7 @@ import static org.mockito.Mockito.when;
/**
* Tests for {@link HealthMvcEndpoint}.
- *
+ *
* @author Christian Dupuis
*/
public class HealthMvcEndpointTests {
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java
index eec4bf866d2..614c8d36eae 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java
@@ -123,8 +123,9 @@ public class CompositeHealthIndicatorTests {
Health result = composite.health();
ObjectMapper mapper = new ObjectMapper();
- assertEquals(
- "{\"status\":\"UNKOWN\",\"db\":{\"status\":\"UNKOWN\",\"db1\":{\"status\":\"UNKOWN\",\"1\":\"1\"},\"db2\":{\"status\":\"UNKOWN\",\"2\":\"2\"}}}",
+ assertEquals("{\"status\":\"UNKNOWN\",\"db\":{\"status\":\"UNKNOWN\""
+ + ",\"db1\":{\"status\":\"UNKNOWN\",\"1\":\"1\"},"
+ + "\"db2\":{\"status\":\"UNKNOWN\",\"2\":\"2\"}}}",
mapper.writeValueAsString(result));
}
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java
index 16b1d159373..4a493d96374 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/MongoHealthIndicatorTests.java
@@ -36,7 +36,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link MongoHealthIndicator}.
- *
+ *
* @author Christian Dupuis
*/
public class MongoHealthIndicatorTests {
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java
index e18d4e14b48..9bfb110c82f 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/OrderedHealthAggregatorTests.java
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertEquals;
/**
* Tests for {@link OrderedHealthAggregator}.
- *
+ *
* @author Christian Dupuis
*/
public class OrderedHealthAggregatorTests {
@@ -40,35 +40,47 @@ public class OrderedHealthAggregatorTests {
}
@Test
- public void testDefaultOrdering() {
+ public void defaultOrder() {
Map healths = new HashMap();
healths.put("h1", new Health(Status.DOWN));
healths.put("h2", new Health(Status.UP));
- healths.put("h3", new Health(Status.UNKOWN));
+ healths.put("h3", new Health(Status.UNKNOWN));
healths.put("h4", new Health(Status.OUT_OF_SERVICE));
assertEquals(Status.DOWN, this.healthAggregator.aggregate(healths).getStatus());
}
@Test
- public void testDefaultOrderingWithCustomStatus() {
+ public void customOrder() {
+ this.healthAggregator.setStatusOrder(Status.UNKNOWN, Status.UP,
+ Status.OUT_OF_SERVICE, Status.DOWN);
+ Map healths = new HashMap();
+ healths.put("h1", new Health(Status.DOWN));
+ healths.put("h2", new Health(Status.UP));
+ healths.put("h3", new Health(Status.UNKNOWN));
+ healths.put("h4", new Health(Status.OUT_OF_SERVICE));
+ assertEquals(Status.UNKNOWN, this.healthAggregator.aggregate(healths).getStatus());
+ }
+
+ @Test
+ public void defaultOrderWithCustomStatus() {
Map healths = new HashMap();
healths.put("h1", new Health(Status.DOWN));
healths.put("h2", new Health(Status.UP));
- healths.put("h3", new Health(Status.UNKOWN));
+ healths.put("h3", new Health(Status.UNKNOWN));
healths.put("h4", new Health(Status.OUT_OF_SERVICE));
healths.put("h5", new Health(new Status("CUSTOM")));
- assertEquals(new Status("CUSTOM"),
- this.healthAggregator.aggregate(healths).getStatus());
+ assertEquals(new Status("CUSTOM"), this.healthAggregator.aggregate(healths)
+ .getStatus());
}
@Test
- public void testDefaultOrderingWithCustomStatusAndOrder() {
+ public void customOrderWithCustomStatus() {
this.healthAggregator.setStatusOrder(Arrays.asList("DOWN", "OUT_OF_SERVICE",
- "UP", "UNKOWN", "CUSTOM"));
+ "UP", "UNKNOWN", "CUSTOM"));
Map healths = new HashMap();
healths.put("h1", new Health(Status.DOWN));
healths.put("h2", new Health(Status.UP));
- healths.put("h3", new Health(Status.UNKOWN));
+ healths.put("h3", new Health(Status.UNKNOWN));
healths.put("h4", new Health(Status.OUT_OF_SERVICE));
healths.put("h5", new Health(new Status("CUSTOM")));
assertEquals(Status.DOWN, this.healthAggregator.aggregate(healths).getStatus());
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/RedisHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/RedisHealthIndicatorTests.java
index 839bd57e6c6..fbde61c07e3 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/RedisHealthIndicatorTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/RedisHealthIndicatorTests.java
@@ -36,7 +36,7 @@ import static org.junit.Assert.assertTrue;
/**
* Tests for {@link RedisHealthIndicator}.
- *
+ *
* @author Christian Dupuis
*/
public class RedisHealthIndicatorTests {
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SimpleDataSourceHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SimpleDataSourceHealthIndicatorTests.java
index 641396534c5..383de81285b 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SimpleDataSourceHealthIndicatorTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/SimpleDataSourceHealthIndicatorTests.java
@@ -36,12 +36,13 @@ import static org.mockito.Mockito.when;
/**
* Tests for {@link SimpleDataSourceHealthIndicator}.
- *
+ *
* @author Dave Syer
*/
public class SimpleDataSourceHealthIndicatorTests {
private final SimpleDataSourceHealthIndicator indicator = new SimpleDataSourceHealthIndicator();
+
private DriverManagerDataSource dataSource;
@Before
@@ -63,7 +64,7 @@ public class SimpleDataSourceHealthIndicatorTests {
public void customQuery() {
this.indicator.setDataSource(this.dataSource);
new JdbcTemplate(this.dataSource)
- .execute("CREATE TABLE FOO (id INTEGER IDENTITY PRIMARY KEY)");
+ .execute("CREATE TABLE FOO (id INTEGER IDENTITY PRIMARY KEY)");
this.indicator.setQuery("SELECT COUNT(*) from FOO");
Health health = this.indicator.health();
System.err.println(health);
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java
index 2813b643333..e779862d6f3 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/VanillaHealthIndicatorTests.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.
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals;
/**
* Tests for {@link VanillaHealthIndicator}.
- *
+ *
* @author Phillip Webb
*/
public class VanillaHealthIndicatorTests {
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporterTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporterTests.java
index de4871eec92..ee785996145 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporterTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporterTests.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.
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepositoryTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepositoryTests.java
index 853e1e997ac..505a65e18a2 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepositoryTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepositoryTests.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.
@@ -40,6 +40,8 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
/**
+ * Tests for {@link RedisMultiMetricRepository}.
+ *
* @author Dave Syer
*/
@RunWith(Parameterized.class)
diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReaderTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReaderTests.java
index 1624b020742..992c5a15621 100644
--- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReaderTests.java
+++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/rich/MultiMetricRichGaugeReaderTests.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.
@@ -25,6 +25,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
+ * Tests for {@link MultiMetricRichGaugeReader}.
+ *
* @author Dave Syer
*/
public class MultiMetricRichGaugeReaderTests {
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigureRegistrar.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigureRegistrar.java
index 231761167fc..29432a25995 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigureRegistrar.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigureRegistrar.java
@@ -26,11 +26,11 @@ import org.springframework.data.solr.repository.config.SolrRepositoryConfigExten
/**
* {@link ImportBeanDefinitionRegistrar} used to auto-configure Spring Data Solr
* repositories.
- *
+ *
* @author Christoph Strobl
* @since 1.1.0
*/
-public class SolrRepositoriesAutoConfigureRegistrar extends
+class SolrRepositoriesAutoConfigureRegistrar extends
AbstractRepositoryConfigurationSourceSupport {
@Override
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrAutoConfiguration.java
index d9510e2f1f7..d4fa3951ec8 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrAutoConfiguration.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrAutoConfiguration.java
@@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Solr
- *
+ *
* @author Christoph Strobl
* @since 1.1.0
*/
@@ -66,4 +66,5 @@ public class SolrAutoConfiguration {
}
return new HttpSolrServer(this.properties.getHost());
}
+
}
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java
index 9055fe1ce1b..53cda6e4551 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/solr/SolrProperties.java
@@ -19,8 +19,8 @@ package org.springframework.boot.autoconfigure.solr;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
- * Configuration properties for Solr.
- *
+ * {@link ConfigurationProperties} for Solr.
+ *
* @author Christoph Strobl
* @since 1.1.0
*/
diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
index e8e7e39a9b0..900486d0dd2 100644
--- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
+++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
@@ -42,7 +42,7 @@ import org.springframework.util.StringUtils;
* {@link ConfigurationProperties properties} for a web server (e.g. port and path
* settings). Will be used to customize an {@link EmbeddedServletContainerFactory} when an
* {@link EmbeddedServletContainerCustomizerBeanPostProcessor} is active.
- *
+ *
* @author Dave Syer
* @author Stephane Nicoll
*/
@@ -159,7 +159,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer {
}
public int getMaxHttpHeaderSize() {
- return maxHttpHeaderSize;
+ return this.maxHttpHeaderSize;
}
public void setMaxHttpHeaderSize(int maxHttpHeaderSize) {
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/JpaRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/JpaRepositoriesAutoConfigurationTests.java
index 2df012490bf..e5222c32fdf 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/JpaRepositoriesAutoConfigurationTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/JpaRepositoriesAutoConfigurationTests.java
@@ -38,7 +38,7 @@ import static org.junit.Assert.assertNotNull;
/**
* Tests for {@link JpaRepositoriesAutoConfiguration}.
- *
+ *
* @author Dave Syer
* @author Oliver Gierke
*/
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigurationTests.java
index 3f3b6d3300d..f3c6ed154e7 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigurationTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/SolrRepositoriesAutoConfigurationTests.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.boot.autoconfigure.data;
import org.apache.solr.client.solrj.SolrServer;
@@ -34,7 +35,7 @@ import static org.junit.Assert.assertThat;
/**
* Tests for {@link SolrRepositoriesAutoConfiguration}
- *
+ *
* @author Christoph Strobl
*/
public class SolrRepositoriesAutoConfigurationTests {
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CityMongoDbRepository.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CityMongoDbRepository.java
index ab87c4c0b95..e4547f12320 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CityMongoDbRepository.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CityMongoDbRepository.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2014 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.
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CitySolrRepository.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CitySolrRepository.java
index 750b3c60ac4..6a95279d43b 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CitySolrRepository.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/alt/CitySolrRepository.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 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.
@@ -13,14 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.boot.autoconfigure.data.alt;
import org.springframework.boot.autoconfigure.data.solr.City;
import org.springframework.data.repository.Repository;
-/**
- * @author Christoph Strobl
- */
public interface CitySolrRepository extends Repository {
}
diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
index 98120e436c8..ef091d31e40 100644
--- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
+++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
@@ -34,7 +34,7 @@ import static org.mockito.Mockito.verify;
/**
* Tests for {@link ServerProperties}.
- *
+ *
* @author Dave Syer
* @author Stephane Nicoll
*/
@@ -98,7 +98,7 @@ public class ServerPropertiesTests {
}
@Test
- public void testCustomizeTomcatHeaderSize() throws Exception {
+ public void testCustomizeTomcatHeaderSize() throws Exception {
Map map = new HashMap();
map.put("server.tomcat.maxHttpHeaderSize", "9999");
new RelaxedDataBinder(this.properties, "server").bind(new MutablePropertyValues(
diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/CompositeProxySelector.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/CompositeProxySelector.java
index c26f65ec7d1..c2996032be0 100644
--- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/CompositeProxySelector.java
+++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/CompositeProxySelector.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.
@@ -24,7 +24,10 @@ import org.eclipse.aether.repository.ProxySelector;
import org.eclipse.aether.repository.RemoteRepository;
/**
+ * Composite {@link ProxySelector}.
+ *
* @author Dave Syer
+ * @since 1.1.0
*/
public class CompositeProxySelector implements ProxySelector {
diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml
index f9f826fe4c4..b110434c872 100644
--- a/spring-boot-dependencies/pom.xml
+++ b/spring-boot-dependencies/pom.xml
@@ -948,7 +948,7 @@
${spring-integration.version}
import
pom
-