Commit c90633aa authored by Phillip Webb's avatar Phillip Webb

Polish

parent c40aab65
...@@ -54,7 +54,6 @@ import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; ...@@ -54,7 +54,6 @@ import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoDataAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.redis.RedisAutoConfiguration; import org.springframework.boot.autoconfigure.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration; import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
...@@ -271,7 +270,6 @@ public class HealthIndicatorAutoConfiguration { ...@@ -271,7 +270,6 @@ public class HealthIndicatorAutoConfiguration {
} }
@Bean @Bean
@ConfigurationProperties("health.diskspace")
public DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties() { public DiskSpaceHealthIndicatorProperties diskSpaceHealthIndicatorProperties() {
return new DiskSpaceHealthIndicatorProperties(); return new DiskSpaceHealthIndicatorProperties();
} }
......
...@@ -18,6 +18,7 @@ package org.springframework.boot.actuate.health; ...@@ -18,6 +18,7 @@ package org.springframework.boot.actuate.health;
import java.io.File; import java.io.File;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
...@@ -26,11 +27,16 @@ import org.springframework.util.Assert; ...@@ -26,11 +27,16 @@ import org.springframework.util.Assert;
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.2.0 * @since 1.2.0
*/ */
@ConfigurationProperties("health.diskspace")
public class DiskSpaceHealthIndicatorProperties { public class DiskSpaceHealthIndicatorProperties {
private static final int MEGABYTES = 1024 * 1024;
private static final int DEFAULT_THRESHOLD = 10 * MEGABYTES;
private File path = new File("."); private File path = new File(".");
private long threshold = 10 * 1024 * 1024; private long threshold = DEFAULT_THRESHOLD;
public File getPath() { public File getPath() {
return this.path; return this.path;
......
...@@ -700,8 +700,8 @@ default converter(s) provided by `Jackson2ObjectMapperBuilder`. ...@@ -700,8 +700,8 @@ default converter(s) provided by `Jackson2ObjectMapperBuilder`.
The `ObjectMapper` (or `XmlMapper` for Jackson XML converter) instance created by default The `ObjectMapper` (or `XmlMapper` for Jackson XML converter) instance created by default
have the following customized properties: have the following customized properties:
* MapperFeature.DEFAULT_VIEW_INCLUSION is disabled * `MapperFeature.DEFAULT_VIEW_INCLUSION` is disabled
* DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES is disabled * `DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES` is disabled
Spring Boot has also some features to make it easier to customize this behavior. Spring Boot has also some features to make it easier to customize this behavior.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment