springboot helloworld 프로그램

HelloApplication.class  
package springbootdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@SpringBootApplication
@Configuration
public class HelloApplication {
	@RequestMapping("hello")
	@ResponseBody
	public String hello() {
		return "hello world!";
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		SpringApplication.run(HelloApplication.class, args);
	}

}
pom.xml

  4.0.0
  com.lwdzpos
  springbootdemo
  0.0.1-SNAPSHOT
  war
    	
		org.springframework.boot
		spring-boot-starter-parent
		1.5.2.RELEASE
	
  
  

			org.springframework.boot
			spring-boot-starter-web
		

  
  
  
  
  
  	
  		
				org.springframework.boot
				spring-boot-maven-plugin
			
  		
  	
  
  

좋은 웹페이지 즐겨찾기