对于Spring Boot Actuator应用程序,有一些额外的管理端点:
POST to /env to update the Environment and rebind @ConfigurationProperties and log levelshttp://localhost:8080/env/testprop它工作并返回:
{
"testprop": "test value"
}但当我执行POST时:不支持http://localhost:8080/env/testprop请求方法‘POST
我想更新testprop,怎么用API更新?
发布于 2017-12-12 20:25:10
我在docs中找到了以下内容
对于Spring Boot Actuator应用程序,有一些额外的管理端点:
用于在ApplicationContext)上调用生命周期方法(()和start()的
看起来您必须再次发布/env,而不是/end/$yourProperty
发布于 2017-12-12 21:58:21
好的,它起作用了:必须在http://localhost:8080/env/?test=dasda为空的情况下发布,响应是:
{
"test": "dasda"
}https://stackoverflow.com/questions/47772459
复制相似问题