in platforms/springboot/src/integration-test/java/io/hawt/springboot/HawtioSpringBootTestSupport.java [118:172]
private TestProperties(final String contextPath,
final String servletPath, final String managementContextPath,
final String managementBasePath, final String jolokiaPath,
final String hawtioPath, final boolean hawtioExposed, final boolean jolokiaExposed,
final boolean hawtioEnabled, final boolean jolokiaEnabled,
final boolean authenticationEnabled) {
List<String> endpoints = new ArrayList<>();
if (hawtioExposed) {
endpoints.add("hawtio");
}
if (jolokiaExposed) {
endpoints.add("jolokia");
}
if (!endpoints.isEmpty()) {
addProperty("management.endpoints.web.exposure.include", String.join(",", endpoints));
}
if (!hawtioEnabled) {
addProperty("management.endpoint.hawtio.enabled", "false");
}
if (!jolokiaEnabled) {
addProperty("management.endpoint.jolokia.enabled", "false");
}
addProperty("server.port", String.valueOf(SERVER_PORT));
addProperty("server.servlet.context-path", contextPath);
addProperty("spring.mvc.servlet.path", servletPath);
addProperty("management.server.servlet.context-path", managementContextPath);
addProperty("management.endpoints.web.base-path", managementBasePath);
addProperty("management.endpoints.web.path-mapping.jolokia", jolokiaPath);
addProperty("management.endpoints.web.path-mapping.hawtio", hawtioPath);
addProperty("hawtio.authenticationEnabled", String.valueOf(authenticationEnabled));
this.contextPath = contextPath;
this.servletPath = servletPath;
this.managementContextPath = managementContextPath;
if (managementBasePath != null) {
this.managementBasePath = managementBasePath;
} else {
this.managementBasePath = "/actuator";
}
if (jolokiaPath != null) {
this.jolokiaPath = Strings.webContextPath(jolokiaPath);
}
if (hawtioPath != null) {
this.hawtioPath = Strings.webContextPath(hawtioPath);
}
}