创建 API 项目(通过数据库创建 Restful 风格 API 项目)

命令是:

bee api giftPoolstatistictsV3 -conn="root:[email protected](127.0.0.1:3306)/gift_pool"

giftPoolstatistictsV3 是项目名称

root 数据库用户名称

123456 数据库密码

127.0.0.1 数据库地址

gift_pool 数据库

 

Beego API 操作记录

 

2,API 文档自动化

cd ./giftPoolstatistictV3

bee generate docs

Beego API 操作记录

 

bee run watchall true

Beego API 操作记录

 

go get github.com/go-sql-driver/mysql

Beego API 操作记录

 

查看文档

http://localhost:8080/swagger

 

bee run -gendoc=true -downdoc=true

Beego API 操作记录

查看

http://localhost:8080/swagger/

结果

Beego API 操作记录

 

Beego API 操作记录

从第二页的图那位置可以看到访问的 HTTP URL。

 

相关文章:

  • 2021-09-01
  • 2021-08-27
  • 2021-07-04
  • 2021-05-20
  • 2021-12-19
  • 2021-08-01
  • 2021-12-23
  • 2021-05-13
猜你喜欢
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-05-17
  • 2021-08-27
  • 2022-12-23
  • 2021-11-20
相关资源
相似解决方案