'migrate CompositeHealthIndicator and OrderedHealthAggreagtor to spring boot 2

try to solve annoying problem for several days.

What is done on spring boot 1: main Class that extends HealthIndicator and have private CompositeHealthIndicator(OrderedHealthAggregator) that compose of some health metrics. Overriden method health on main class, that obviously return CompositeHealthIndicator.health(). And somewhere else this overriden health used.

But spring boot 2 made thus pretty cool and simple classes deprecated for flavor of CompositeHealthContributor and SimpleStatusAggregator. BUT they totally different classes, that even not return and sort health, so how i am get same functionallity as before for deprecated classes? Just wanna aggregate healths and return it composed and sorted, but boot 2 looks so weird and complicated to solve this problem at easy way



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source