搭建一个入门springboot工程(Spring Initializr创建方式)


 

 

 

 

 

 

 

创建完成

 

 启动效果如图:

项目启动成功........

 

已正常访问........

编写controller查看前后端交互信息........

 

 

 1 import org.springframework.stereotype.Controller;  2 import org.springframework.web.bind.annotation.RequestMapping;  3 import org.springframework.web.bind.annotation.ResponseBody;  4 
 5 @Controller  6 public class StuController {  7 
 8     @RequestMapping("/start")  9  @ResponseBody 10     public String init(){ 11         return "hi,springboot"; 12  } 13 }

 

OK...........


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM