Folks,
If i understand the API correctly, method needs to be an enum, however, the following errors out.
@RequestMapping(value="/greeting",method=GET)
public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
return new Greeting(counter.incrementAndGet(),
String.format(template, name));
}
gradle build --info errors out with
/src/main/java/hello/GreetingController.java:20: cannot find symbol
symbol : variable GET
location: class main.java.hello.GreetingController
@RequestMapping(value="/greeting",method=GET)
RequestMethod.GETor have animport static RequestMethod.GETto make it work. If you don't have one of those it won't work.