关于与 @snicoll 讨论的#11107,当将方法添加到 Endpoint 时,采用驼峰式(或 pascal 式)的端点 id 会被拒绝。
这是在 Spring Boot 2.0.5 和 2.1.0.M4 上测试的
例如:
@Component
@Endpoint(id = "camelCase")
public class CamelCaseEndpoint {
@ReadOperation
public String hello() {
return "hello";
}
}
Description:
Configuration property name 'management.endpoint.camelCase.cache.time-to-live' is not valid:
Invalid characters: 'C'
Bean: jmxMBeanExporter
Reason: Canonical names should be kebab-case ('-' separated), lowercase alpha-numeric characters and must start with a letter
Action:
Modify 'management.endpoint.camelCase.cache.time-to-live' so that it conforms to the canonical names requirements.