@RestResource(title="Hello World", description="An example of the simplest-possible resource", path="/helloWorld") @HtmlDocConfig(aside={"<div style=\'max-width:400px\' class=\'text\'>","\t<p>This page shows a resource that simply response with a \'Hello world!\' message</p>","\t<p>The POJO serialized is a simple String.</p>","</div>"}) public class HelloWorldResource extends Object implements BasicRestConfig
Constructor and Description |
---|
HelloWorldResource() |
Modifier and Type | Method and Description |
---|---|
Swagger |
getOptions(RestRequest req)
[OPTIONS /*] - Show resource options.
|
String |
sayHello()
GET request handler.
|
public HelloWorldResource()
@RestMethod(name="GET", path="/*", summary="Responds with \"Hello world!\"") public String sayHello()
public Swagger getOptions(RestRequest req)
BasicRestConfig
getOptions
in interface BasicRestConfig
req
- The HTTP request.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.