?
用python簡單編程例子,
查看pom.xml文件,剛才選擇web,導入的依賴包
增加一個package,叫controller
python 例子?
在controller的package里面增加一個接口叫做HelloContrllor
代碼:https://github.com/NIGHTFIGHTING/spring_boot_learning/tree/master/01
package com.liuqi.boot.liuqiboothelloworld.controller;import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;@RestController
public class HelloController {@GetMapping("/home")public String Home() {return "hello liuqi!\n";}
}
#默認spring boot端口8080
curl http://127.0.0.1:8080/home
IDEA如何配置SpringBoot項目
python入門案例?https://jingyan.baidu.com/article/f0062228e64b7cbbd3f0c8cc.html
?
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态