Skip to content

Instantly share code, notes, and snippets.

@javaeeeee
Created February 25, 2017 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javaeeeee/053088595fcea00b28cbb40f5bc25199 to your computer and use it in GitHub Desktop.
Save javaeeeee/053088595fcea00b28cbb40f5bc25199 to your computer and use it in GitHub Desktop.
An example Spring MVC REST controller
package com.javaeeeee.springrest.controllers;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@GetMapping("/hello")
public String getGreeting() {
return "Hello Spring World!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment