Fix HTTP status code mapping in HealthMvcEndpoint

refs #1264
This commit is contained in:
Christian Dupuis 2014-07-17 16:12:06 +02:00
parent 3145edff3a
commit 99971a6578

View File

@ -156,7 +156,8 @@ public class EndpointWebMvcAutoConfiguration implements ApplicationContextAware,
@ConditionalOnExpression("${endpoints.health.enabled:true}")
public HealthMvcEndpoint healthMvcEndpoint(HealthEndpoint delegate) {
HealthMvcEndpoint healthMvcEndpoint = new HealthMvcEndpoint(delegate);
if (this.healthMvcEndpointProperties.getMapping() != null) {
if (this.healthMvcEndpointProperties.getMapping() != null
&& this.healthMvcEndpointProperties.getMapping().size() > 0) {
healthMvcEndpoint.setStatusMapping(this.healthMvcEndpointProperties
.getMapping());
}