框架下载下来执行 curl 'http://127.0.0.1:8880/demo/dao?id=1' 报错
来源:5-2 后端框架选型

会飞的小蚂蚁
2020-09-08
数据库中的表创建成功了。执行go mod tidy 安装依赖后,执行了go run main.go 如下图
然后创建表后执行:curl 'http://127.0.0.1:8880/demo/dao?id=1'
报错如下:
$ curl 'http://127.0.0.1:3001/demo/dao?id=1'
{"errno":2001,"errmsg":"record not
found","data":"","trace_id":"c0a838015f57a1508f940e28104dc7b0","stack":"record not found"}
老师代码是原封不动下载的仓库里面的。出现这种错是可能是因为啥原因?
写回答
1回答
-
会飞的小蚂蚁
提问者
2020-09-08
找到原因了,数据库id不对,未获取到内容~~
012021-07-14
相似问题