Skip to content

Commit

Permalink
Makes health configuration optional (line#2104)
Browse files Browse the repository at this point in the history
A previous change fixed health status mapping, but in the process made
it required to have health autoconfiguration. This fixes the below
error:

```
Parameter 3 of method actuatorServerConfigurator in com.linecorp.armeria.spring.actuate.ArmeriaSpringActuatorAutoConfiguration required a bean of type 'org.springframework.boot.actuate.health.HealthStatusHttpMapper' that could not be found.
```
  • Loading branch information
adriancole authored and trustin committed Sep 25, 2019
1 parent 18e8ac9 commit c211a17
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -103,6 +103,12 @@ WebEndpointDiscoverer webEndpointDiscoverer(
filters.orderedStream().collect(toImmutableList()));
}

@Bean
@ConditionalOnMissingBean // In case HealthEndpointAutoConfiguration is excluded
HealthStatusHttpMapper healthStatusHttpMapper() {
return new HealthStatusHttpMapper();
}

@Bean
ArmeriaServerConfigurator actuatorServerConfigurator(
WebEndpointsSupplier endpointsSupplier,
Expand Down

0 comments on commit c211a17

Please sign in to comment.