spring-boot-actuator-endpoints

本文深入探讨了Spring Boot Actuator提供的监控和管理端点,如何使用它们来监控应用健康状况、获取应用信息以及进行性能调优。通过Actuator,开发者可以轻松集成监控工具,实现对Spring Boot应用程序的全面洞察。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

{
   
  "hints": [
    {
   
      "values": [
        {
   
          "value": "*"
        }
      ],
      "name": "management.endpoints.web.cors.allowed-headers",
      "providers": [
        {
   
          "name": "any"
        }
      ]
    },
    {
   
      "values": [
        {
   
          "value": "*"
        }
      ],
      "name": "management.endpoints.web.cors.allowed-methods",
      "providers": [
        {
   
          "name": "any"
        }
      ]
    },
    {
   
      "values": [
        {
   
          "value": "*"
        }
      ],
      "name": "management.endpoints.web.cors.allowed-origins",
      "providers": [
        {
   
          "name": "any"
        }
      ]
    },
    {
   
      "values": [
        {
   
          "value": "auditevents"
        },
        {
   
          "value": "beans"
        },
        {
   
          "value": "conditions"
        },
        {
   
          "value": "configprops"
        },
        {
   
          "value": "env"
        },
        {
   
          "value": "flyway"
        },
        {
   
          "value": "health"
        },
        {
   
          "value": "heapdump"
        },
        {
   
          "value": "httptrace"
        },
        {
   
          "value": "info"
        },
        {
   
          "value": "liquibase"
        },
        {
   
          "value": "logfile"
        },
        {
   
          "value": "loggers"
        },
        {
   
          "value": "mappings"
        },
        {
   
          "value": "metrics"
        },
        {
   
          "value": "prometheus"
        },
        {
   
          "value": "scheduledtasks"
        },
        {
   
          "value": "sessions"
        },
        {
   
          "value": "shutdown"
        },
        {
   
          "value": "threaddump"
        }
      ],
      "name": "management.endpoints.web.path-mapping.keys",
      "providers": [
        {
   
          "name": "any"
        }
      ]
    },
    {
   
      "values": [
        {
   
          "value": "UNKNOWN"
        },
        {
   
          "value": "UP"
        },
        {
   
          "value": "DOWN"
        },
        {
   
          "value": "OUT_OF_SERVICE"
        }
      ],
      "name": "management.health.status.order",
      "providers": [
        {
   
          "name": "any"
        }
      ]
    }
  ],
  "groups": [
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint",
      "name": "management.endpoint.conditions",
      "type": "org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointProperties",
      "name": "management.endpoint.configprops",
      "type": "org.springframework.boot.actuate.autoconfigure.context.properties.ConfigurationPropertiesReportEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointProperties",
      "name": "management.endpoint.env",
      "type": "org.springframework.boot.actuate.autoconfigure.env.EnvironmentEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties",
      "name": "management.endpoint.health",
      "type": "org.springframework.boot.actuate.autoconfigure.health.HealthEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.jolokia.JolokiaProperties",
      "name": "management.endpoint.jolokia",
      "type": "org.springframework.boot.actuate.autoconfigure.jolokia.JolokiaProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.jolokia.JolokiaEndpoint",
      "name": "management.endpoint.jolokia",
      "type": "org.springframework.boot.actuate.autoconfigure.jolokia.JolokiaEndpoint"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointProperties",
      "name": "management.endpoint.logfile",
      "type": "org.springframework.boot.actuate.autoconfigure.logging.LogFileWebEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties",
      "name": "management.endpoints.jmx",
      "type": "org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties",
      "name": "management.endpoints.jmx.exposure",
      "sourceMethod": "getExposure()",
      "type": "org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointProperties$Exposure"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties",
      "name": "management.endpoints.web",
      "type": "org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties",
      "name": "management.endpoints.web.cors",
      "type": "org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties",
      "name": "management.endpoints.web.exposure",
      "sourceMethod": "getExposure()",
      "type": "org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties$Exposure"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthIndicatorProperties",
      "name": "management.health.diskspace",
      "type": "org.springframework.boot.actuate.autoconfigure.system.DiskSpaceHealthIndicatorProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchHealthIndicatorProperties",
      "name": "management.health.elasticsearch",
      "type": "org.springframework.boot.actuate.autoconfigure.elasticsearch.ElasticsearchHealthIndicatorProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorProperties",
      "name": "management.health.status",
      "type": "org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties",
      "name": "management.info",
      "type": "org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties",
      "name": "management.info.git",
      "sourceMethod": "getGit()",
      "type": "org.springframework.boot.actuate.autoconfigure.info.InfoContributorProperties$Git"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties",
      "name": "management.metrics",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties",
      "name": "management.metrics.distribution",
      "sourceMethod": "getDistribution()",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties$Distribution"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.atlas.AtlasProperties",
      "name": "management.metrics.export.atlas",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.atlas.AtlasProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.datadog.DatadogProperties",
      "name": "management.metrics.export.datadog",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.datadog.DatadogProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia.GangliaProperties",
      "name": "management.metrics.export.ganglia",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.ganglia.GangliaProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.graphite.GraphiteProperties",
      "name": "management.metrics.export.graphite",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.graphite.GraphiteProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.influx.InfluxProperties",
      "name": "management.metrics.export.influx",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.influx.InfluxProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.jmx.JmxProperties",
      "name": "management.metrics.export.jmx",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.jmx.JmxProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic.NewRelicProperties",
      "name": "management.metrics.export.newrelic",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.newrelic.NewRelicProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusProperties",
      "name": "management.metrics.export.prometheus",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.prometheus.PrometheusProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxProperties",
      "name": "management.metrics.export.signalfx",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.signalfx.SignalFxProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleProperties",
      "name": "management.metrics.export.simple",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdProperties",
      "name": "management.metrics.export.statsd",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront.WavefrontProperties",
      "name": "management.metrics.export.wavefront",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront.WavefrontProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties",
      "name": "management.metrics.web",
      "sourceMethod": "getWeb()",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties$Web"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties$Web",
      "name": "management.metrics.web.client",
      "sourceMethod": "getClient()",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties$Web$Client"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties$Web",
      "name": "management.metrics.web.server",
      "sourceMethod": "getServer()",
      "type": "org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties$Web$Server"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties",
      "name": "management.server",
      "type": "org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties",
      "name": "management.server.servlet",
      "sourceMethod": "getServlet()",
      "type": "org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties$Servlet"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties",
      "name": "management.server.ssl",
      "sourceMethod": "getSsl()",
      "type": "org.springframework.boot.web.server.Ssl"
    },
    {
   
      "sourceType": "org.springframework.boot.actuate.autoconfigure.trace.http.HttpTraceProperties",
      "name": "management.trace.http",
      "type": "org.springframework.boot.actuate.autoconfigure.trace.http.HttpTraceProperties"
    }
  ],
  "properties": [
    {
   
      "deprecated": true,
      "name": "endpoints.actuator.enabled",
      "description": "Whether to enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "The \"actuator\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.actuator.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "The \"actuator\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.actuator.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "The \"actuator\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.auditevents.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.auditevents.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.auditevents.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.auditevents"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.auditevents.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.autoconfig.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.conditions.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.autoconfig.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.autoconfig.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.conditions"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.autoconfig.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.beans.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.beans.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.beans.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.beans.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.beans"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.beans.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.configprops.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.configprops.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.configprops.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.configprops.keys-to-sanitize",
      "description": "Keys that should be sanitized. Keys can be simple strings that the property ends with or regex expressions.",
      "type": "java.lang.String[]",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.configprops.keys-to-sanitize"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.configprops.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.configprops"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.configprops.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.cors.allow-credentials",
      "description": "Set whether credentials are supported. When not set, credentials are not supported.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.cors.allow-credentials"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.cors.allowed-headers",
      "description": "Comma-separated list of headers to allow in a request. '*' allows all headers.",
      "type": "java.util.List<java.lang.String>",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.cors.allowed-headers"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.cors.allowed-methods",
      "description": "Comma-separated list of methods to allow. '*' allows all methods. When not set,\n defaults to GET.",
      "type": "java.util.List<java.lang.String>",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.cors.allowed-methods"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.cors.allowed-origins",
      "description": "Comma-separated list of origins to allow. '*' allows all origins. When not set,\n CORS support is disabled.",
      "type": "java.util.List<java.lang.String>",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.cors.allowed-origins"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.cors.exposed-headers",
      "description": "Comma-separated list of headers to include in a response.",
      "type": "java.util.List<java.lang.String>",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.cors.exposed-headers"
      }
    },
    {
   
      "defaultValue": 1800,
      "deprecated": true,
      "name": "endpoints.cors.max-age",
      "description": "How long, in seconds, the response from a pre-flight request can be cached by\n clients.",
      "type": "java.lang.Long",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.cors.max-age"
      }
    },
    {
   
      "defaultValue": false,
      "deprecated": true,
      "name": "endpoints.docs.curies.enabled",
      "description": "Whether to enable the curie generation.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "The \"docs\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.docs.enabled",
      "description": "Whether to enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "The \"docs\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.docs.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "The \"docs\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.docs.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "The \"docs\" endpoint is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.dump.enabled",
      "description": "Whether to enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.threaddump.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.dump.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.dump.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.dump"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.dump.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "defaultValue": true,
      "deprecated": true,
      "name": "endpoints.enabled",
      "description": "Whether to enable endpoints.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.enabled-by-default"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.env.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.env.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.env.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.env.keys-to-sanitize",
      "description": "Keys that should be sanitized. Keys can be simple strings that the property ends with or regex expressions.",
      "type": "java.lang.String[]",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.env.keys-to-sanitize"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.env.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.env"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.env.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.flyway.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.flyway.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.flyway.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.flyway.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.health.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.health.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.health.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.health.mapping",
      "description": "Mapping of health statuses to HTTP status codes. By default, registered health\n statuses map to sensible defaults (i.e. UP maps to 200).",
      "type": "java.util.Map<java.lang.String,org.springframework.http.HttpStatus>",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.health.status.http-mapping"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.health.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.health"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.health.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "defaultValue": 1000,
      "deprecated": true,
      "name": "endpoints.health.time-to-live",
      "description": "Time to live for cached result, in milliseconds.",
      "type": "java.lang.Long",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.health.cache.time-to-live"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.heapdump.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.heapdump.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.heapdump.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.heapdump"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.heapdump.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "defaultValue": false,
      "deprecated": true,
      "name": "endpoints.hypermedia.enabled",
      "description": "Whether to enable hypermedia support for endpoints.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Hypermedia support in the Actuator is no longer available.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.info.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.info.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.info.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.info.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.info"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.info.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.jmx.domain",
      "description": "JMX domain name. Initialized with the value of 'spring.jmx.default-domain' if set.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.jmx.domain"
      }
    },
    {
   
      "defaultValue": true,
      "deprecated": true,
      "name": "endpoints.jmx.enabled",
      "description": "Whether to enable JMX export of all endpoints.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.jmx.exposure.exclude"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.jmx.static-names",
      "description": "Additional static properties to append to all ObjectNames of MBeans representing\n Endpoints.",
      "type": "java.util.Properties",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.jmx.static-names"
      }
    },
    {
   
      "defaultValue": false,
      "deprecated": true,
      "name": "endpoints.jmx.unique-names",
      "description": "Whether to ensure that ObjectNames are modified in case of conflict.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.jmx.unique-names"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.jolokia.enabled",
      "description": "Whether to enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.jolokia.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.jolokia.path",
      "description": "Endpoint URL path.",
      "type": "java.lang.String",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoints.web.path-mapping.jolokia"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.jolokia.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.liquibase.enabled",
      "description": "Enable the endpoint.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "level": "error",
        "replacement": "management.endpoint.liquibase.enabled"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.liquibase.id",
      "description": "Endpoint identifier. With HTTP monitoring the identifier of the endpoint is mapped\n to a URL (e.g. 'foo' is mapped to '\/foo').",
      "type": "java.lang.String",
      "deprecation": {
   
        "reason": "Endpoint identifier is no longer customizable.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.liquibase.sensitive",
      "description": "Mark if the endpoint exposes sensitive information.",
      "type": "java.lang.Boolean",
      "deprecation": {
   
        "reason": "Endpoint sensitive flag is no longer customizable as Spring Boot no longer provides a customizable security auto-configuration\n. Create or adapt your security configuration accordingly.",
        "level": "error"
      }
    },
    {
   
      "deprecated": true,
      "name": "endpoints.logfile.enable
### 集成 `spring-boot-starter-actuator` 和 Gateway 为了在 Spring Boot 项目中成功集成 `spring-boot-starter-actuator` 和 Gateway,需遵循特定配置方法。 #### 添加依赖项 首先,在项目的 `pom.xml` 文件中添加必要的 Maven 依赖项: ```xml <dependencies> <!-- Actuator --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <!-- WebFlux for Gateway --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId> </dependency> <!-- 移除 spring-boot-starter-web 并确保不会引入冲突的Web组件 [^2]--> </dependencies> ``` 注意移除了 `spring-boot-starter-web` 以防止与网关模块发生冲突。这一步骤对于避免潜在启动失败至关重要。 #### 启用端点暴露 接着修改 `application.yml` 或者 `application.properties` 来启用并自定义 actuator 的行为: ```yaml management: endpoints: web: exposure: include: "*" # 暴露所有默认端点 endpoint: health: show-details: always # 始终显示健康详情 ``` 此设置允许通过 HTTP 访问所有的管理端点,并且当查询 `/actuator/health` 路径时总是返回详细的健康状态信息。 #### 自定义路由规则 (可选) 如果希望进一步定制化 API 网关的行为,则可以在应用程序属性文件里指定额外的路由规则或其他配置选项。例如: ```yaml spring: cloud: gateway: routes: - id: example_route uri: http://example.org/ predicates: - Path=/api/** ``` 上述 YAML 片段创建了一个名为 "example_route" 的新路由,它会匹配任何以 "/api/" 开头的请求并将它们转发给目标 URI。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值