6

我使用以下给定属性启用了管理端点,包括 httptrace。

management.endpoints.web.exposure.include=*

但使用http://localhost:8081/actuator/httptrace

请求正文参数未响应

{
"traces": [
    {
        "timestamp": "2019-02-15T01:39:50.595Z",
        "principal": null,
        "session": null,
        "request": {
            "method": "POST",
            "uri": "http://localhost:8080/hi",
            "headers": {
                "content-length": [
                    "15"
                ],
                "postman-token": [
                    "82b0e3eb-6359-4d06-980c-669e553ef5b8"
                ],
                "host": [
                    "localhost:8080"
                ],
                "connection": [
                    "keep-alive"
                ],
                "content-type": [
                    "application/json"
                ],
                "cache-control": [
                    "no-cache"
                ],
                "accept-encoding": [
                    "gzip, deflate"
                ],
                "accept": [
                    "*/*"
                ],
                "user-agent": [
                    "PostmanRuntime/7.6.0"
                ]
            },
            "remoteAddress": null
        },
        "response": {
            "status": 200,
            "headers": {}
        },
        "timeTaken": 1
    }
]

}

4

1 回答 1

4

不幸的是,目前 Actuator 不支持开箱即用:

Github问题

您可以按照此StackOverflow 线程中的描述实现自己的端点

于 2019-09-06T16:05:36.690 回答