Skip to content

ServletEndpoints should not register under the Jersey context path if there is a management port #15891

@zuckel

Description

@zuckel

In Spring Boot 2.1.2 (since 2.0.7) with a Jersey webapp, a @ServletEndpoint will be registered under the jersey context-path even on the management port.

Current behavior

If the configuration looks like this,

@ApplicationPath("/app")
public class JerseyConfig extends ResourceConfig {
@ServletEndpoint(id = "selftest")
public class SelftestEndpoint implements Supplier<EndpointServlet> {
server.port: 8080
management.server.port: 8081

the actuator will be registered under http://localhost:8081/app/actuator/selftest.

The actuator overview http://localhost:8081/actuator lists the actuator under http://localhost:8081/actuator/selftest.

Expectations

  • All actuators should be reachable following the links from the actuator overview.
  • If there is a management port, all actuators should sit directly under the same actuator context-path.

Sample project

https://github.com/1and1/httpselftest/tree/servletendpoint (branch servletendpoint, sub-module selftest-springboot-example)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions