Polish
This commit is contained in:
parent
c40aab657f
commit
c90633aab6
|
@ -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 {
|
||||||
}
|
}
|
||||||
|
|
||||||
@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;
|
||||||
|
|
||||||
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;
|
||||||
* @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`.
|
||||||
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.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue