Rename Endpoint path to ID
This commit is contained in:
parent
451acb5679
commit
43b820a7d3
|
|
@ -29,23 +29,32 @@ import javax.validation.constraints.Pattern;
|
||||||
public abstract class AbstractEndpoint<T> implements Endpoint<T> {
|
public abstract class AbstractEndpoint<T> implements Endpoint<T> {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Pattern(regexp = "/[^/]*", message = "Path must start with /")
|
@Pattern(regexp = "\\w+", message = "ID must only contains letters, numbers and '_'")
|
||||||
private String path;
|
private String id;
|
||||||
|
|
||||||
private boolean sensitive;
|
private boolean sensitive;
|
||||||
|
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
|
|
||||||
public AbstractEndpoint(String path) {
|
public AbstractEndpoint(String id) {
|
||||||
this(path, true, true);
|
this(id, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractEndpoint(String path, boolean sensitive, boolean enabled) {
|
public AbstractEndpoint(String id, boolean sensitive, boolean enabled) {
|
||||||
this.path = path;
|
this.id = id;
|
||||||
this.sensitive = sensitive;
|
this.sensitive = sensitive;
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return this.enabled;
|
return this.enabled;
|
||||||
}
|
}
|
||||||
|
|
@ -54,15 +63,6 @@ public abstract class AbstractEndpoint<T> implements Endpoint<T> {
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getPath() {
|
|
||||||
return this.path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPath(String path) {
|
|
||||||
this.path = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSensitive() {
|
public boolean isSensitive() {
|
||||||
return this.sensitive;
|
return this.sensitive;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class AutoConfigurationReportEndpoint extends AbstractEndpoint<Report> {
|
||||||
private AutoConfigurationReport autoConfigurationReport;
|
private AutoConfigurationReport autoConfigurationReport;
|
||||||
|
|
||||||
public AutoConfigurationReportEndpoint() {
|
public AutoConfigurationReportEndpoint() {
|
||||||
super("/autoconfig");
|
super("autoconfig");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class BeansEndpoint extends AbstractEndpoint<List<Object>> implements
|
||||||
private JsonParser parser = JsonParserFactory.getJsonParser();
|
private JsonParser parser = JsonParserFactory.getJsonParser();
|
||||||
|
|
||||||
public BeansEndpoint() {
|
public BeansEndpoint() {
|
||||||
super("/beans");
|
super("beans");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ public class ConfigurationPropertiesReportEndpoint extends
|
||||||
private ApplicationContext context;
|
private ApplicationContext context;
|
||||||
|
|
||||||
public ConfigurationPropertiesReportEndpoint() {
|
public ConfigurationPropertiesReportEndpoint() {
|
||||||
super("/configprops");
|
super("configprops");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class DumpEndpoint extends AbstractEndpoint<List<ThreadInfo>> {
|
||||||
* Create a new {@link DumpEndpoint} instance.
|
* Create a new {@link DumpEndpoint} instance.
|
||||||
*/
|
*/
|
||||||
public DumpEndpoint() {
|
public DumpEndpoint() {
|
||||||
super("/dump");
|
super("dump");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,18 @@ package org.springframework.boot.actuate.endpoint;
|
||||||
public interface Endpoint<T> {
|
public interface Endpoint<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the path of the endpoint. Must start with '/' and should not include
|
* The logical ID of the endpoint. Must only contain simple letters, numbers and '_'
|
||||||
* wildcards.
|
* characters (ie a {@literal "\w"} regex).
|
||||||
*/
|
*/
|
||||||
String getPath();
|
String getId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns if the endpoint is sensitive, i.e. may return data that the average user
|
* Return if the endpoint is enabled.
|
||||||
|
*/
|
||||||
|
boolean isEnabled();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return if the endpoint is sensitive, i.e. may return data that the average user
|
||||||
* should not see. Mappings can use this as a security hint.
|
* should not see. Mappings can use this as a security hint.
|
||||||
*/
|
*/
|
||||||
boolean isSensitive();
|
boolean isSensitive();
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class EnvironmentEndpoint extends AbstractEndpoint<Map<String, Object>> i
|
||||||
* Create a new {@link EnvironmentEndpoint} instance.
|
* Create a new {@link EnvironmentEndpoint} instance.
|
||||||
*/
|
*/
|
||||||
public EnvironmentEndpoint() {
|
public EnvironmentEndpoint() {
|
||||||
super("/env");
|
super("env");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -36,15 +36,11 @@ public class HealthEndpoint<T> extends AbstractEndpoint<T> {
|
||||||
* @param indicator the health indicator
|
* @param indicator the health indicator
|
||||||
*/
|
*/
|
||||||
public HealthEndpoint(HealthIndicator<? extends T> indicator) {
|
public HealthEndpoint(HealthIndicator<? extends T> indicator) {
|
||||||
super("/health", false, true);
|
super("health", false, true);
|
||||||
Assert.notNull(indicator, "Indicator must not be null");
|
Assert.notNull(indicator, "Indicator must not be null");
|
||||||
this.indicator = indicator;
|
this.indicator = indicator;
|
||||||
}
|
}
|
||||||
|
|
||||||
HealthEndpoint() {
|
|
||||||
super("/health", false, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T invoke() {
|
public T invoke() {
|
||||||
return this.indicator.health();
|
return this.indicator.health();
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class InfoEndpoint extends AbstractEndpoint<Map<String, Object>> {
|
||||||
* @param info the info to expose
|
* @param info the info to expose
|
||||||
*/
|
*/
|
||||||
public InfoEndpoint(Map<String, ? extends Object> info) {
|
public InfoEndpoint(Map<String, ? extends Object> info) {
|
||||||
super("/info", false, true);
|
super("info", false, true);
|
||||||
Assert.notNull(info, "Info must not be null");
|
Assert.notNull(info, "Info must not be null");
|
||||||
this.info = info;
|
this.info = info;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class MetricsEndpoint extends AbstractEndpoint<Map<String, Object>> {
|
||||||
* @param metrics the metrics to expose
|
* @param metrics the metrics to expose
|
||||||
*/
|
*/
|
||||||
public MetricsEndpoint(PublicMetrics metrics) {
|
public MetricsEndpoint(PublicMetrics metrics) {
|
||||||
super("/metrics");
|
super("metrics");
|
||||||
Assert.notNull(metrics, "Metrics must not be null");
|
Assert.notNull(metrics, "Metrics must not be null");
|
||||||
this.metrics = metrics;
|
this.metrics = metrics;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>> impl
|
||||||
* Create a new {@link ShutdownEndpoint} instance.
|
* Create a new {@link ShutdownEndpoint} instance.
|
||||||
*/
|
*/
|
||||||
public ShutdownEndpoint() {
|
public ShutdownEndpoint() {
|
||||||
super("/shutdown", true, false);
|
super("shutdown", true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class TraceEndpoint extends AbstractEndpoint<List<Trace>> {
|
||||||
* @param repository the trace repository
|
* @param repository the trace repository
|
||||||
*/
|
*/
|
||||||
public TraceEndpoint(TraceRepository repository) {
|
public TraceEndpoint(TraceRepository repository) {
|
||||||
super("/trace");
|
super("trace");
|
||||||
Assert.notNull(repository, "Repository must not be null");
|
Assert.notNull(repository, "Repository must not be null");
|
||||||
this.repository = repository;
|
this.repository = repository;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
|
||||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link HandlerMapping} to map {@link Endpoint}s to URLs via {@link Endpoint#getPath()}.
|
* {@link HandlerMapping} to map {@link Endpoint}s to URLs via {@link Endpoint#getId()}.
|
||||||
* Only endpoints that are annotated as <code>@FrameworkEndpoint</code> will be mapped,
|
* Only endpoints that are annotated as <code>@FrameworkEndpoint</code> will be mapped,
|
||||||
* and within that class only those methods with <code>@RequestMapping</code> will be
|
* and within that class only those methods with <code>@RequestMapping</code> will be
|
||||||
* exposed. The semantics of <code>@RequestMapping</code> should be identical to a normal
|
* exposed. The semantics of <code>@RequestMapping</code> should be identical to a normal
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class GenericMvcEndpoint implements MvcEndpoint {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
return this.delegate.getPath();
|
return "/" + this.delegate.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -42,17 +42,17 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
|
||||||
|
|
||||||
private final Class<?> type;
|
private final Class<?> type;
|
||||||
|
|
||||||
private final String path;
|
private final String id;
|
||||||
|
|
||||||
private final boolean sensitive;
|
private final boolean sensitive;
|
||||||
|
|
||||||
private final String property;
|
private final String property;
|
||||||
|
|
||||||
public AbstractEndpointTests(Class<?> configClass, Class<?> type, String path,
|
public AbstractEndpointTests(Class<?> configClass, Class<?> type, String id,
|
||||||
boolean sensitive, String property) {
|
boolean sensitive, String property) {
|
||||||
this.configClass = configClass;
|
this.configClass = configClass;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.path = path;
|
this.id = id;
|
||||||
this.sensitive = sensitive;
|
this.sensitive = sensitive;
|
||||||
this.property = property;
|
this.property = property;
|
||||||
}
|
}
|
||||||
|
|
@ -72,8 +72,8 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getPath() throws Exception {
|
public void getId() throws Exception {
|
||||||
assertThat(getEndpointBean().getPath(), equalTo(this.path));
|
assertThat(getEndpointBean().getId(), equalTo(this.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
@ -82,12 +82,12 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void pathOverride() throws Exception {
|
public void idOverride() throws Exception {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
TestUtils.addEnviroment(this.context, this.property + ".path:/mypath");
|
TestUtils.addEnviroment(this.context, this.property + ".id:myid");
|
||||||
this.context.register(this.configClass);
|
this.context.register(this.configClass);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
assertThat(getEndpointBean().getPath(), equalTo("/mypath"));
|
assertThat(getEndpointBean().getId(), equalTo("myid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class AutoConfigurationReportEndpointTests extends
|
||||||
AbstractEndpointTests<AutoConfigurationReportEndpoint> {
|
AbstractEndpointTests<AutoConfigurationReportEndpoint> {
|
||||||
|
|
||||||
public AutoConfigurationReportEndpointTests() {
|
public AutoConfigurationReportEndpointTests() {
|
||||||
super(Config.class, AutoConfigurationReportEndpoint.class, "/autoconfig", true,
|
super(Config.class, AutoConfigurationReportEndpoint.class, "autoconfig", true,
|
||||||
"endpoints.autoconfig");
|
"endpoints.autoconfig");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import static org.junit.Assert.assertTrue;
|
||||||
public class BeansEndpointTests extends AbstractEndpointTests<BeansEndpoint> {
|
public class BeansEndpointTests extends AbstractEndpointTests<BeansEndpoint> {
|
||||||
|
|
||||||
public BeansEndpointTests() {
|
public BeansEndpointTests() {
|
||||||
super(Config.class, BeansEndpoint.class, "/beans", true, "endpoints.beans");
|
super(Config.class, BeansEndpoint.class, "beans", true, "endpoints.beans");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class ConfigurationPropertiesReportEndpointTests extends
|
||||||
AbstractEndpointTests<ConfigurationPropertiesReportEndpoint> {
|
AbstractEndpointTests<ConfigurationPropertiesReportEndpoint> {
|
||||||
|
|
||||||
public ConfigurationPropertiesReportEndpointTests() {
|
public ConfigurationPropertiesReportEndpointTests() {
|
||||||
super(Config.class, ConfigurationPropertiesReportEndpoint.class, "/configprops",
|
super(Config.class, ConfigurationPropertiesReportEndpoint.class, "configprops",
|
||||||
true, "endpoints.configprops");
|
true, "endpoints.configprops");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import java.lang.management.ThreadInfo;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.boot.actuate.endpoint.DumpEndpoint;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
@ -36,7 +35,7 @@ import static org.junit.Assert.assertThat;
|
||||||
public class DumpEndpointTests extends AbstractEndpointTests<DumpEndpoint> {
|
public class DumpEndpointTests extends AbstractEndpointTests<DumpEndpoint> {
|
||||||
|
|
||||||
public DumpEndpointTests() {
|
public DumpEndpointTests() {
|
||||||
super(Config.class, DumpEndpoint.class, "/dump", true, "endpoints.dump");
|
super(Config.class, DumpEndpoint.class, "dump", true, "endpoints.dump");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import static org.junit.Assert.assertThat;
|
||||||
public class EnvironmentEndpointTests extends AbstractEndpointTests<EnvironmentEndpoint> {
|
public class EnvironmentEndpointTests extends AbstractEndpointTests<EnvironmentEndpoint> {
|
||||||
|
|
||||||
public EnvironmentEndpointTests() {
|
public EnvironmentEndpointTests() {
|
||||||
super(Config.class, EnvironmentEndpoint.class, "/env", true, "endpoints.env");
|
super(Config.class, EnvironmentEndpoint.class, "env", true, "endpoints.env");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
package org.springframework.boot.actuate.endpoint;
|
package org.springframework.boot.actuate.endpoint;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.boot.actuate.endpoint.HealthEndpoint;
|
|
||||||
import org.springframework.boot.actuate.health.HealthIndicator;
|
import org.springframework.boot.actuate.health.HealthIndicator;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
@ -34,7 +33,7 @@ import static org.junit.Assert.assertThat;
|
||||||
public class HealthEndpointTests extends AbstractEndpointTests<HealthEndpoint<String>> {
|
public class HealthEndpointTests extends AbstractEndpointTests<HealthEndpoint<String>> {
|
||||||
|
|
||||||
public HealthEndpointTests() {
|
public HealthEndpointTests() {
|
||||||
super(Config.class, HealthEndpoint.class, "/health", false, "endpoints.health");
|
super(Config.class, HealthEndpoint.class, "health", false, "endpoints.health");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import static org.junit.Assert.assertThat;
|
||||||
public class InfoEndpointTests extends AbstractEndpointTests<InfoEndpoint> {
|
public class InfoEndpointTests extends AbstractEndpointTests<InfoEndpoint> {
|
||||||
|
|
||||||
public InfoEndpointTests() {
|
public InfoEndpointTests() {
|
||||||
super(Config.class, InfoEndpoint.class, "/info", false, "endpoints.info");
|
super(Config.class, InfoEndpoint.class, "info", false, "endpoints.info");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
|
|
||||||
import org.springframework.boot.actuate.endpoint.PublicMetrics;
|
|
||||||
import org.springframework.boot.actuate.metrics.Metric;
|
import org.springframework.boot.actuate.metrics.Metric;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
@ -38,7 +36,7 @@ import static org.junit.Assert.assertThat;
|
||||||
public class MetricsEndpointTests extends AbstractEndpointTests<MetricsEndpoint> {
|
public class MetricsEndpointTests extends AbstractEndpointTests<MetricsEndpoint> {
|
||||||
|
|
||||||
public MetricsEndpointTests() {
|
public MetricsEndpointTests() {
|
||||||
super(Config.class, MetricsEndpoint.class, "/metrics", true, "endpoints.metrics");
|
super(Config.class, MetricsEndpoint.class, "metrics", true, "endpoints.metrics");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import static org.junit.Assert.assertTrue;
|
||||||
public class ShutdownEndpointTests extends AbstractEndpointTests<ShutdownEndpoint> {
|
public class ShutdownEndpointTests extends AbstractEndpointTests<ShutdownEndpoint> {
|
||||||
|
|
||||||
public ShutdownEndpointTests() {
|
public ShutdownEndpointTests() {
|
||||||
super(Config.class, ShutdownEndpoint.class, "/shutdown", true,
|
super(Config.class, ShutdownEndpoint.class, "shutdown", true,
|
||||||
"endpoints.shutdown");
|
"endpoints.shutdown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ package org.springframework.boot.actuate.endpoint;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.boot.actuate.endpoint.TraceEndpoint;
|
|
||||||
import org.springframework.boot.actuate.trace.InMemoryTraceRepository;
|
import org.springframework.boot.actuate.trace.InMemoryTraceRepository;
|
||||||
import org.springframework.boot.actuate.trace.Trace;
|
import org.springframework.boot.actuate.trace.Trace;
|
||||||
import org.springframework.boot.actuate.trace.TraceRepository;
|
import org.springframework.boot.actuate.trace.TraceRepository;
|
||||||
|
|
@ -38,7 +37,7 @@ import static org.junit.Assert.assertThat;
|
||||||
public class TraceEndpointTests extends AbstractEndpointTests<TraceEndpoint> {
|
public class TraceEndpointTests extends AbstractEndpointTests<TraceEndpoint> {
|
||||||
|
|
||||||
public TraceEndpointTests() {
|
public TraceEndpointTests() {
|
||||||
super(Config.class, TraceEndpoint.class, "/trace", true, "endpoints.trace");
|
super(Config.class, TraceEndpoint.class, "trace", true, "endpoints.trace");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -167,11 +167,11 @@ public class EndpointMBeanExporterTests {
|
||||||
public static class TestEndpoint extends AbstractEndpoint<String> {
|
public static class TestEndpoint extends AbstractEndpoint<String> {
|
||||||
|
|
||||||
public TestEndpoint() {
|
public TestEndpoint() {
|
||||||
super("/test");
|
super("test");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String doInvoke() {
|
public String invoke() {
|
||||||
return "hello world";
|
return "hello world";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue