搭建一個入門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