赞
踩
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId> spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
</parent>
<!--web的starter-->
<dependency>
<groupId>org.sprngframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
@Controller
public class helloController{
@RequestMapping("/hello")
@ResponseBody
public String hello(){
return "hello";
}
}
@SpringBootApplication
public class HelloApplication{
public static void main(String[] args){
SpringApplication.run(HelloApplication.class,args);
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。