跳到主要内容

Spring Integration 图 (integrationgraph)

DeepSeek V3 中英对照 Spring Integration Graph (integrationgraph) Spring Integration Graph (integrationgraph)

integrationgraph 端点暴露了一个包含所有 Spring Integration 组件的图。

检索 Spring 集成图

要检索应用程序的信息,可以向 /actuator/integrationgraph 发送一个 GET 请求,如下面的基于 curl 的示例所示:

$ curl 'http://localhost:8080/actuator/integrationgraph' -i -X GET
bash

生成的响应类似于以下内容:

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

{
"contentDescriptor" : {
"providerVersion" : "6.4.1",
"providerFormatVersion" : 1.2,
"provider" : "spring-integration"
},
"nodes" : [ {
"nodeId" : 1,
"componentType" : "null-channel",
"integrationPatternType" : "null_channel",
"integrationPatternCategory" : "messaging_channel",
"properties" : { },
"name" : "nullChannel",
"observed" : false
}, {
"nodeId" : 2,
"componentType" : "publish-subscribe-channel",
"integrationPatternType" : "publish_subscribe_channel",
"integrationPatternCategory" : "messaging_channel",
"properties" : { },
"name" : "errorChannel",
"observed" : false
}, {
"nodeId" : 3,
"componentType" : "logging-channel-adapter",
"integrationPatternType" : "outbound_channel_adapter",
"integrationPatternCategory" : "messaging_endpoint",
"properties" : { },
"input" : "errorChannel",
"name" : "errorLogger",
"observed" : false
} ],
"links" : [ {
"from" : 2,
"to" : 3,
"type" : "input"
} ]
}
http

响应结构

响应中包含了应用程序中使用的所有 Spring Integration 组件,以及它们之间的链接。有关结构的更多信息,请参阅参考文档

重建 Spring 集成图

要重新构建暴露的图,请向 /actuator/integrationgraph 发送一个 POST 请求,如下面基于 curl 的示例所示:

$ curl 'http://localhost:8080/actuator/integrationgraph' -i -X POST
bash

这将返回一个 204 - No Content 响应:

HTTP/1.1 204 No Content
http