Difference between revisions of "Spring Boot"

From air
Jump to navigation Jump to search
(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...")
 
Line 2: Line 2:
   
   
<code language="java">
+
<source language="java">
   
 
package hello;
 
package hello;
Line 27: Line 27:
   
   
</code>
+
</source>

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);
    }
}