上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 58 下一页
摘要: router.go myModules.go userController.go 阅读全文
posted @ 2019-05-02 11:20 刘大飞 阅读(1314) 评论(0) 推荐(0) 编辑
摘要: golang语言中没有继承,但是可以依靠组合来模拟继承和多态。 但是,这样模拟出来的继承是有局限的,也就是说:在需要多态的时候,需要小心。 阅读全文
posted @ 2019-05-02 11:01 刘大飞 阅读(506) 评论(0) 推荐(0) 编辑
摘要: app.conf: 阅读全文
posted @ 2019-05-02 10:38 刘大飞 阅读(324) 评论(0) 推荐(0) 编辑
摘要: JSon串在被串行化后保存在文件中,读取字符串时,是不能直接拿来用JSON.parse()解析为JSON 对象的。因为它是一个字符串,不是一个合法的JSON对象格式。例如下面的JSON串保存在文件中,读出来不能直接解析: 这个串如果出现在代码中是没有问题的,因为反斜杠就表示转义,但如果从文本文件中直 阅读全文
posted @ 2019-04-25 21:25 刘大飞 阅读(4735) 评论(0) 推荐(0) 编辑
摘要: 在这个目录下: ${JAVA_HOME}\jre\lib\security 执行 keytool -importcert -trustcacerts -file yourcerfile.pem -alias ca_alias -keystore "C:\Java\jdk1.8.0_151\jre\l 阅读全文
posted @ 2019-04-25 09:15 刘大飞 阅读(2485) 评论(0) 推荐(0) 编辑
摘要: 1 安装redis: apt update apt-get install redis-server 2: cd /etc/redis 3: 用redis-cli导出key redis-cli -h {redis host} -p 6379 -a {password} keys "*" |while 阅读全文
posted @ 2019-04-24 17:14 刘大飞 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 1 DB参数配置在app.conf 2 模型定义在Models.go中 3 main 阅读全文
posted @ 2019-04-13 22:49 刘大飞 阅读(2515) 评论(0) 推荐(0) 编辑
摘要: 直接上常用的例子吧: A: 获取URL中的参数 router func init() { beego.Router("/task/?:id/?:name", &controllers.TaskController{}) } controller func (c *TaskController) Ge 阅读全文
posted @ 2019-04-10 23:03 刘大飞 阅读(1629) 评论(0) 推荐(0) 编辑
摘要: 1 Router和Controller的常用配置 beego.Router("/user/admin", &controllers.UserController{}) // Get和Post都能用 beego.Router("/test", &controllers.UserController{}) // Get和POST请求都能处理 beego.Router(... 阅读全文
posted @ 2019-04-09 22:30 刘大飞 阅读(741) 评论(0) 推荐(0) 编辑
摘要: 下面的命令我都是在$GOPATH的路径下执行的: 1. 首先下载beego框架: go get github.com/astaxie/beego (注意:运行上面命令时没有反应,需要在etc/hosts里配置 192.30.253.112 github.com 151.101.185.194 git 阅读全文
posted @ 2019-04-08 21:57 刘大飞 阅读(1279) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 58 下一页