Skip to content

Instantly share code, notes, and snippets.

@nasminspy
Created June 8, 2016 10:56
Show Gist options
  • Save nasminspy/343fe790835357deed3b8b8b93830e6d to your computer and use it in GitHub Desktop.
Save nasminspy/343fe790835357deed3b8b8b93830e6d to your computer and use it in GitHub Desktop.
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/test")
public class SampleController {
@RequestMapping(value="sample", method = RequestMethod.GET)
@ResponseBody
public String returnTitle(){
return "REST web service content!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment