Created
January 19, 2014 20:40
-
-
Save caritos/8510719 to your computer and use it in GitHub Desktop.
Application.java. Demo file for Spring Boot
This file contains 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 demo; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
import org.springframework.context.annotation.ComponentScan; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@ComponentScan | |
@EnableAutoConfiguration | |
@RestController | |
public class Application { | |
@RequestMapping("/") | |
public String hello() { | |
return "Hello World!"; | |
} | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment