0

我想迁移使用此依赖项的旧 Spring 项目:

    org.springframework.boot.actuate.health.HealthAggregator
    org.springframework.boot.actuate.health.OrderedHealthAggregator
    ..........
    @Autowired
    private final HealthAggregator healthAggregator = new OrderedHealthAggregator();

此类需要导入:

'org.springframework.boot:spring-boot-actuator-autoconfigure:2.0.2.RELEASE'

我尝试在 Spring Boot 2.6.4 版本中使用最新版本:

import org.springframework.boot.actuate.health.StatusAggregator;
import org.springframework.boot.actuate.health.OrderedHealthAggregator;

但我找不到哪个班级正在取代OrderedHealthAggregator

你知道 Spring Boot 2.6.4 应该使用哪个类吗?

4

1 回答 1

1

OrderedHealthAggregator被替换为SimpleStatusAggregator

于 2022-03-01T20:49:44.147 回答