Skip to content

Instantly share code, notes, and snippets.

@contee213
Created July 12, 2014 22:49
Show Gist options
  • Save contee213/250993ef70980b19dbcf to your computer and use it in GitHub Desktop.
Save contee213/250993ef70980b19dbcf to your computer and use it in GitHub Desktop.
Spring Boot Sample
package net.contee.sample.hello;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* Created by contee on 2014/07/13.
*/
@Controller
@EnableAutoConfiguration
public class SampleController {
@RequestMapping("/")
@ResponseBody
String hello() {
return "Hello World!";
}
public static void main(String[] args) {
SpringApplication.run(SampleController.class, args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment