Difference between revisions of "Spring Boot"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
− | <source |
+ | <source lang="java"> |
package hello; |
package hello; |
Revision as of 12:38, 18 May 2016
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);
}
}