Created
February 25, 2017 20:32
-
-
Save javaeeeee/053088595fcea00b28cbb40f5bc25199 to your computer and use it in GitHub Desktop.
An example Spring MVC REST controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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