@RestSchema(schemaId="codeFirst")
@RequestMapping(path="/codeFirstSpringmvc",
produces="application/json")
public class CodeFirstSpringmvc
extends Object
| Constructor and Description |
|---|
CodeFirstSpringmvc() |
| Modifier and Type | Method and Description |
|---|---|
int |
add(int a,
int b) |
Date |
addDate(Date date,
long seconds) |
String |
addString(List<String> s) |
byte[] |
bytes(byte[] input) |
io.servicecomb.swagger.invocation.Response |
cseResponse(io.servicecomb.swagger.invocation.context.InvocationContext c1) |
boolean |
isTrue() |
int |
reduce(javax.servlet.http.HttpServletRequest request,
int b) |
org.springframework.http.ResponseEntity<Date> |
responseEntity(io.servicecomb.swagger.invocation.context.InvocationContext c1,
Date date) |
Person |
sayHello(Person user) |
String |
sayHi(String name) |
String |
sayHi2(String name) |
String |
saySomething(String prefix,
Person user) |
String |
testRawJsonString(String jsonInput) |
Map<String,User> |
testUserMap(Map<String,User> userMap) |
String |
textPlain(String body) |
@RequestMapping(path="/responseEntity",
method=POST)
public org.springframework.http.ResponseEntity<Date> responseEntity(io.servicecomb.swagger.invocation.context.InvocationContext c1,
@RequestAttribute(value="date")
Date date)
@RequestMapping(path="/cseResponse",
method=GET)
public io.servicecomb.swagger.invocation.Response cseResponse(io.servicecomb.swagger.invocation.context.InvocationContext c1)
@RequestMapping(path="/testUserMap",
method=POST)
public Map<String,User> testUserMap(@RequestBody
Map<String,User> userMap)
@RequestMapping(path="/textPlain",
method=POST,
consumes="text/plain")
public String textPlain(@RequestBody
String body)
@RequestMapping(path="/bytes",
method=POST)
public byte[] bytes(@RequestBody
byte[] input)
@RequestMapping(path="/addDate",
method=POST)
public Date addDate(@RequestAttribute(value="date")
Date date,
@QueryParam(value="seconds")
long seconds)
@RequestMapping(path="/add",
method=POST)
public int add(@RequestAttribute(value="a")
int a,
@RequestAttribute(value="b")
int b)
@RequestMapping(path="/reduce",
method=GET)
public int reduce(javax.servlet.http.HttpServletRequest request,
@CookieValue(name="b")
int b)
@RequestMapping(path="/sayhello",
method=POST)
public Person sayHello(@RequestBody
Person user)
@RequestMapping(path="/testrawjson",
method=POST)
public String testRawJsonString(String jsonInput)
@RequestMapping(path="/saysomething",
method=POST)
public String saySomething(@RequestHeader(name="prefix")
String prefix,
@RequestBody
Person user)
@RequestMapping(path="/sayhi/{name}",
method=PUT)
public String sayHi(@PathVariable(name="name")
String name)
@RequestMapping(path="/sayhi/{name}/v2",
method=PUT)
public String sayHi2(@PathVariable(name="name")
String name)
@RequestMapping(path="/istrue",
method=GET)
public boolean isTrue()
Copyright © 2017. All rights reserved.