首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    SpringBoot - 构建监控体系01_使用 Actuator 组件实现及扩展系统监控

    如何在现有的监控端点上添加定制化功能 扩展 Actuator 端点 扩展 Info端点 (InfoContributor ) 方式一: 配置文件 方式二:实现 InfoContributor 接口 重写contribute...---- 方式二:实现 InfoContributor 接口 重写contribute() 方法 很多时候,Spring Boot 自身提供的 Info 端点并不能满足我们的业务需求,这就需要我们编写一个自定义的...方法也很简单,我们直接实现 InfoContributor 接口的 contribute() 方法即可。例如,我们希望在 Info 端点中暴露该应用的构建时间,就可以采用如下所示的代码进行操作。...Component public class ArtisanInfoContributor implements InfoContributor { @Override public void contribute

    1.3K20
    领券