框架下载下来执行 curl 'http://127.0.0.1:8880/demo/dao?id=1' 报错

来源:5-2 后端框架选型

会飞的小蚂蚁

2020-09-08

数据库中的表创建成功了。执行go mod tidy 安装依赖后,执行了go run main.go 如下图

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不对,未获取到内容~~

0
1
qq_方与圆境与心_0
请问数据库id具体是指的什么呢,我的error是2000,然后是出现的get pool error
2021-07-14
共1条回复

(打造简历金牌项目)Vue+Go 开发企业级微服务网关项目

简历中摒弃烂大街的培训机构项目,带你开发企业级微服务网关

1301 学习 · 340 问题

查看课程