|
|
|
|
12
|
private final AtomicLong counter = new AtomicLong();
|
12
|
private final AtomicLong counter = new AtomicLong();
|
13
|
|
13
|
|
14
|
@RequestMapping("/greeting")
|
14
|
@RequestMapping("/greeting")
|
15
|
- public Greeting greeting(@RequestParam(value="name", required=false, defaultValue="World") String name) {
|
|
|
|
|
15
|
+ public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
|
16
|
return new Greeting(counter.incrementAndGet(),
|
16
|
return new Greeting(counter.incrementAndGet(),
|
17
|
String.format(template, name));
|
17
|
String.format(template, name));
|
18
|
}
|
18
|
}
|