Skip to content

Endpoint exposure patterns do not work with dashed IDs #20997

@NoMindToThink

Description

@NoMindToThink

springboot version : 2.2.6.RELEASE
springcloud version: Hoxton.SR3

When I use the bus-fresh endpoint, I find it does not work
my yml is :

management:
  endpoints:
    web:
      exposure:
        include: bus-refresh

But I tried to use * instead of bus-refresh, it started working,for example:

management:
  endpoints:
    web:
      exposure:
        include: "*"

This prevents me from just opening the bus-refresh endpoint。
when i checked source code , i found the reason,in org.springframework.boot.actuate.endpoint.EndpointId, line 145

	public static EndpointId fromPropertyValue(String value) {
		return new EndpointId(value.replace("-", ""));
	}

bus-refresh is replaced with busrefresh, which cannot be matched。
please help me, How to expose only bus-refresh endpoint?
Please forgive me for my poor English, tks

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions