add
This commit is contained in:
parent
adc141c35c
commit
8a81a280b2
|
|
@ -3,20 +3,17 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
|
||||
/**
|
||||
* @author chenyuzhen
|
||||
*/
|
||||
@RestController
|
||||
public class GreetingController {
|
||||
|
||||
private static final String template = "Hello, %s!";
|
||||
private static final String TEMPLATE = "Hello dear, %s!";
|
||||
@GetMapping("/greeting")
|
||||
|
||||
public String greeting(@RequestParam(value = "name", defaultValue = "World") String name) {
|
||||
return String.format(template, name);
|
||||
return String.format(TEMPLATE, name);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue