Spring Boot

From air
Revision as of 12:38, 18 May 2016 by Donsez (talk | contribs) (Created page with "http://projects.spring.io/spring-boot/ <code language="java"> package hello; import org.springframework.boot.*; import org.springframework.boot.autoconfigure.*; import org...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

http://projects.spring.io/spring-boot/


package hello;

import org.springframework.boot.*; import org.springframework.boot.autoconfigure.*; import org.springframework.stereotype.*; import org.springframework.web.bind.annotation.*;

@Controller @EnableAutoConfiguration public class SampleController {

   @RequestMapping("/")
   @ResponseBody
   String home() {
       return "Hello World!";
   }
   public static void main(String[] args) throws Exception {
       SpringApplication.run(SampleController.class, args);
   }

}