@RestSchema(schemaId="controller")
@RequestMapping(path="/controller",
produces="application/json")
public class ControllerImpl
extends Object
| Constructor and Description |
|---|
ControllerImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
add(int a,
int b) |
String |
sayHei(String name) |
String |
sayHello(String name) |
String |
sayHi(javax.servlet.http.HttpServletRequest request) |
String |
saySomething(String prefix,
Person user) |
@RequestMapping(path="/add",
method=GET)
public int add(@RequestParam(value="a")
int a,
@RequestParam(value="b")
int b)
@RequestMapping(path="/sayhello/{name}",
method=POST)
public String sayHello(@PathVariable(value="name")
String name)
@RequestMapping(path="/saysomething",
method=POST)
public String saySomething(String prefix,
@RequestBody
Person user)
@RequestMapping(path="/sayhi",
method=GET)
public String sayHi(javax.servlet.http.HttpServletRequest request)
Copyright © 2017. All rights reserved.