SpringBoot版本升级后jHipster项目中的度量/执行器不工作

SpringBoot版本升级后jHipster项目中的度量/执行器不工作,jhipster,metrics,spring-boot-actuator,Jhipster,Metrics,Spring Boot Actuator,项目详细信息: 使用Jhipster 4.3.0生成 现在,SpringBoot版本从1.5.2升级到了2.2.6 SpringBoot版本升级后,管理>度量不起作用 Application.yml-指标 management: server: servlet: context-path: /management endpoints: web: base-path: /management exposure: includ

项目详细信息

  • 使用Jhipster 4.3.0生成
  • 现在,SpringBoot版本从1.5.2升级到了2.2.6
  • SpringBoot版本升级后,管理>度量不起作用

    Application.yml-指标

    management:
    server:
        servlet:
           context-path: /management
    endpoints:
       web:
          base-path: /management
          exposure:
              include: ['configprops', 'env', 'health', 'info', 'metrics', 'jhimetrics', 'logfile', 'loggers', 'prometheus', 'threaddump']
    endpoint:
       jhimetrics:
          enabled: true
    metrics:
       enable:
          http: true
          jvm: true
          logback: true
          process: true
          system: true
    
    在击球时,我得到以下回应:

    {"names":[
      "cache.removals",
      "http.server.requests",
      "cache.evictions",
      "cache.gets",
      "process.start.time",
      "cache.puts",
      "http.server.requests.percentile",
      "jvm.threads.states",
      "jvm.memory.committed",
      "jdbc.connections.active",
      "jvm.gc.memory.promoted",
      "jvm.memory.max",
      "jvm.gc.pause.percentile",
      "jvm.gc.max.data.size",
      "jvm.gc.pause",
      "jdbc.connections.max",
      "jdbc.connections.min",
      "system.cpu.count",
      "logback.events",
      "jvm.memory.used",
      "jvm.threads.daemon",
      "jvm.buffer.memory.used",
      "system.cpu.usage",
      "jvm.gc.memory.allocated",
      "jdbc.connections.idle",
      "jvm.threads.live",
      "jvm.threads.peak",
      "process.uptime",
      "process.cpu.usage",
      "jvm.classes.loaded",
      "jvm.classes.unloaded",
      "jvm.gc.live.data.size",
      "jvm.buffer.count",
      "jvm.buffer.total.capacity"]}
    
    我期待着这样的回应:

    我也试着打,这里我得到了404错误


    有人遇到过类似的问题或有什么解决方案吗?请提供帮助。

    您使用的是什么客户端框架?你把JHipster更新到最新版本了吗,还是只是Spring Boot?我正在使用AngularJs。只有SpringBoot版本升级,而不是JHipster。在SpringBoot升级之前,度量标准正常工作。如果您已从boot 1.x更新到2.2.x,则响应格式已更改。我认为您必须修改客户端代码。