Spring Integration Graph(integrationgraph)
integrationgraph)
integrationgraph 端点暴露了一个包含所有 Spring Integration 组件的图。
获取 Spring Integration 图
要获取有关应用程序的信息,请向 /actuator/integrationgraph 发起 GET 请求,如下列基于 curl 的示例所示:
$ curl 'http://localhost:8080/actuator/integrationgraph' -i -X GET
得到的响应类似于以下内容:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 1033
{
"contentDescriptor" : {
"providerVersion" : "7.0.2",
"providerFormatVersion" : 1.2,
"provider" : "spring-integration"
},
"links" : [ {
"from" : 2,
"to" : 3,
"type" : "input"
} ],
"nodes" : [ {
"nodeId" : 1,
"name" : "nullChannel",
"componentType" : "null-channel",
"integrationPatternCategory" : "messaging_channel",
"integrationPatternType" : "null_channel",
"observed" : false,
"properties" : { }
}, {
"nodeId" : 2,
"name" : "errorChannel",
"componentType" : "publish-subscribe-channel",
"integrationPatternCategory" : "messaging_channel",
"integrationPatternType" : "publish_subscribe_channel",
"observed" : false,
"properties" : { }
}, {
"nodeId" : 3,
"name" : "errorLogger",
"input" : "errorChannel",
"componentType" : "logging-channel-adapter",
"integrationPatternCategory" : "messaging_endpoint",
"integrationPatternType" : "outbound_channel_adapter",
"observed" : false,
"properties" : { }
} ]
}
响应结构
响应中包含应用程序内使用的所有 Spring Integration 组件,以及它们之间的链接。有关结构的更多信息,请参阅参考文档。
重建 Spring Integration 图
要重建暴露的图,向 /actuator/integrationgraph 发起一个 POST 请求,如下列基于 curl 的示例所示:
$ curl 'http://localhost:8080/actuator/integrationgraph' -i -X POST
这将导致一个 204 - No Content 响应:
HTTP/1.1 204 No Content