Skip to content

Instantly share code, notes, and snippets.

@bassemZohdy
Created February 21, 2015 17:54
Show Gist options
  • Save bassemZohdy/bd17a09d161d7ddc3f6e to your computer and use it in GitHub Desktop.
Save bassemZohdy/bd17a09d161d7ddc3f6e to your computer and use it in GitHub Desktop.
@RestController
class HelloController{
@RequestMapping
public String hello(@RequestParam(required=false) String name){
if(StringUtils.isEmpty(name))
return "Hello World !\n";
else
return "Hello "+name+" !\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment