資訊 (info)

info 端點提供有關應用程式的通用資訊。

檢索資訊

要檢索應用程式資訊,請向 /actuator/info 發出 GET 請求,如以下基於 curl 的示例所示

$ curl 'https://:8080/actuator/info' -i -X GET

結果響應類似於以下內容

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 2821

{
  "git" : {
    "branch" : "main",
    "commit" : {
      "id" : "df027cf",
      "time" : "2025-11-20T16:33:47Z"
    }
  },
  "build" : {
    "artifact" : "application",
    "version" : "1.0.3",
    "group" : "com.example"
  },
  "os" : {
    "arch" : "amd64",
    "name" : "Linux",
    "version" : "6.11.0-1018-azure"
  },
  "process" : {
    "cpus" : 4,
    "memory" : {
      "garbageCollectors" : [ {
        "collectionCount" : 11,
        "name" : "G1 Young Generation"
      }, {
        "collectionCount" : 4,
        "name" : "G1 Concurrent GC"
      }, {
        "collectionCount" : 0,
        "name" : "G1 Old Generation"
      } ],
      "heap" : {
        "committed" : 162529280,
        "init" : 262144000,
        "max" : 1610612736,
        "used" : 71097400
      },
      "nonHeap" : {
        "committed" : 89260032,
        "init" : 7667712,
        "max" : -1,
        "used" : 87458240
      }
    },
    "owner" : "runner",
    "parentPid" : 87536,
    "pid" : 108322,
    "virtualThreads" : {
      "mounted" : 0,
      "parallelism" : 4,
      "poolSize" : 0,
      "queued" : 0
    }
  },
  "java" : {
    "jvm" : {
      "name" : "OpenJDK 64-Bit Server VM",
      "vendor" : "BellSoft",
      "version" : "25.0.1+11-LTS"
    },
    "runtime" : {
      "name" : "OpenJDK Runtime Environment",
      "version" : "25.0.1+11-LTS"
    },
    "vendor" : {
      "name" : "BellSoft"
    },
    "version" : "25.0.1"
  },
  "ssl" : {
    "bundles" : [ {
      "certificateChains" : [ {
        "alias" : "spring-boot",
        "certificates" : [ {
          "issuer" : "CN=localhost,OU=Spring,O=VMware,L=Palo Alto,ST=California,C=US",
          "serialNumber" : "eb6114a6ae39ce6c",
          "signatureAlgorithmName" : "SHA256withRSA",
          "subject" : "CN=localhost,OU=Spring,O=VMware,L=Palo Alto,ST=California,C=US",
          "validity" : {
            "status" : "VALID"
          },
          "validityEnds" : "2123-04-11T11:26:57Z",
          "validityStarts" : "2023-05-05T11:26:57Z",
          "version" : "V3"
        } ]
      }, {
        "alias" : "test-alias",
        "certificates" : [ {
          "issuer" : "CN=localhost,OU=Spring,O=VMware,L=Palo Alto,ST=California,C=US",
          "serialNumber" : "14ca9ba6abe2a70d",
          "signatureAlgorithmName" : "SHA256withRSA",
          "subject" : "CN=localhost,OU=Spring,O=VMware,L=Palo Alto,ST=California,C=US",
          "validity" : {
            "status" : "VALID"
          },
          "validityEnds" : "2123-04-11T11:26:58Z",
          "validityStarts" : "2023-05-05T11:26:58Z",
          "version" : "V3"
        } ]
      }, {
        "alias" : "spring-boot-cert",
        "certificates" : [ ]
      }, {
        "alias" : "test-alias-cert",
        "certificates" : [ ]
      } ],
      "name" : "test-0"
    } ]
  }
}

響應結構

響應包含有關應用程式的通用資訊。響應的每個部分均由 InfoContributor 提供。Spring Boot 提供了幾個貢獻者,如下所述。

構建響應結構

下表描述了響應中 build 部分的結構

路徑 型別 描述

artifact

字串

應用程式的 Artifact ID(如果有)。

group

字串

應用程式的 Group ID(如果有)。

name

字串

應用程式名稱(如果有)。

version

字串

應用程式版本(如果有)。

time

可變

應用程式構建的時間戳(如果有)。

Git 響應結構

下表描述了響應中 git 部分的結構

路徑 型別 描述

branch

字串

Git 分支名稱(如果有)。

commit

物件

Git 提交的詳細資訊(如果有)。

commit.time

可變

提交時間戳(如果有)。

commit.id

字串

提交 ID(如果有)。

這是“簡單”輸出。貢獻者還可以配置為輸出所有可用資料。

OS 響應結構

下表描述了響應中 os 部分的結構

路徑 型別 描述

name

字串

作業系統名稱(從“os.name”系統屬性獲取)。

version

字串

作業系統版本(從“os.version”系統屬性獲取)。

arch

字串

作業系統架構(從“os.arch”系統屬性獲取)。

Process 響應結構

下表描述了響應中 process 部分的結構

路徑 型別 描述

pid

數字

程序 ID。

parentPid

數字

父程序 ID(或 -1)。

owner

字串

程序所有者。

cpus

數字

程序可用的 CPU 數量。

memory

物件

記憶體資訊。

memory.heap

物件

堆記憶體。

memory.heap.init

數字

JVM 最初請求的位元組數。

memory.heap.used

數字

當前使用的位元組數。

memory.heap.committed

數字

JVM 已提交使用的位元組數。

memory.heap.max

數字

JVM 可使用的最大位元組數(或 -1)。

memory.nonHeap

物件

非堆記憶體。

memory.nonHeap.init

數字

JVM 最初請求的位元組數。

memory.nonHeap.used

數字

當前使用的位元組數。

memory.nonHeap.committed

數字

JVM 已提交使用的位元組數。

memory.nonHeap.max

數字

JVM 可使用的最大位元組數(或 -1)。

memory.garbageCollectors

陣列

垃圾收集器的詳細資訊。

memory.garbageCollectors[].name

字串

垃圾收集器名稱。

memory.garbageCollectors[].collectionCount

數字

已發生的收集總數。

virtualThreads

物件

虛擬執行緒資訊(如果 VirtualThreadSchedulerMXBean 可用)

virtualThreads.mounted

數字

排程器當前已掛載的虛擬執行緒數量估計。

virtualThreads.queued

數字

已排隊等待排程器啟動或繼續執行的虛擬執行緒數量估計。

virtualThreads.parallelism

數字

排程器的目標並行度。

virtualThreads.poolSize

數字

排程器已啟動但尚未終止的平臺執行緒當前數量

Java 響應結構

下表描述了響應中 java 部分的結構

路徑 型別 描述

version

字串

Java 版本(如果可用)。

vendor

物件

供應商詳細資訊。

vendor.name

字串

供應商名稱(如果可用)。

vendor.version

字串

供應商版本(如果可用)。

runtime

物件

執行時詳細資訊。

runtime.name

字串

執行時名稱(如果可用)。

runtime.version

字串

執行時版本(如果可用)。

jvm

物件

JVM 詳細資訊。

jvm.name

字串

JVM 名稱(如果可用)。

jvm.vendor

字串

JVM 供應商(如果可用)。

jvm.version

字串

JVM 版本(如果可用)。

SSL 響應結構

下表描述了響應中 ssl 部分的結構

路徑 型別 描述

bundles

陣列

SSL 捆綁包資訊。

bundles[].name

字串

SSL 捆綁包的名稱。

bundles[].certificateChains

陣列

捆綁包中的證書鏈。

bundles[].certificateChains[].alias

字串

證書鏈的別名。

bundles[].certificateChains[].certificates

陣列

鏈中的證書。

bundles[].certificateChains[].certificates[].subject

字串

證書主題。

bundles[].certificateChains[].certificates[].version

字串

證書版本。

bundles[].certificateChains[].certificates[].issuer

字串

證書頒發者。

bundles[].certificateChains[].certificates[].validityStarts

字串

證書有效期開始日期。

bundles[].certificateChains[].certificates[].serialNumber

字串

證書序列號。

bundles[].certificateChains[].certificates[].validityEnds

字串

證書有效期結束日期。

bundles[].certificateChains[].certificates[].validity

物件

證書有效期資訊。

bundles[].certificateChains[].certificates[].validity.status

字串

證書有效期狀態。

bundles[].certificateChains[].certificates[].signatureAlgorithmName

字串

簽名演算法名稱。

© . This site is unofficial and not affiliated with VMware.