JedisCluster操作redis集群
摘要:1、pom引入依赖 2、property配置文件,配置集群信息 REDIS_CLUSTER_CFG=127.0.0.1:7000,127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003,127.0.0.1:7004 3、封装实例 4、进行操作
阅读全文
posted @
2018-01-10 17:53
蛋尼
阅读(325)
推荐(0)
死无对证:tomcat7 + 中文cookie + goLang
摘要:查了下资料,很多人遇到这个问题,但是goLang使用得相对少 java.lang.IllegalArgumentException: Control character in cookie value or attribute 基本解决思路是:服务端url编码 + web端js进行url解码 js解
阅读全文
posted @
2018-01-09 10:33
蛋尼
阅读(220)
推荐(0)
axios请求带上cookie配置
摘要:Axios.defaults.withCredentials = true 参考:https://segmentfault.com/a/1190000008872646
阅读全文
posted @
2018-01-08 17:05
蛋尼
阅读(1875)
推荐(0)
golang判断文件/文件夹是否存在
摘要:使用os包,os.stat返回err==nil,说明存在; os.IsNotExist(err)为true,说明不存在;否则不确定是否存在
阅读全文
posted @
2018-01-07 16:30
蛋尼
阅读(972)
推荐(0)
beego orm 时间相差八小时
摘要:使用beego框架,前端调用api插入一条数据到mysql,时间差了8个小时,fuck!!! 解决办法: 在db的url后面加上时区-
阅读全文
posted @
2018-01-07 15:43
蛋尼
阅读(625)
推荐(0)
js检查字符串的包含关系
摘要:首先想到的是str.contains(),用的时候发现报错了 正确的判断方法应该用:str.indexof(substring),不包含的话,返回-1。大小写敏感
阅读全文
posted @
2018-01-06 22:09
蛋尼
阅读(386)
推荐(0)
element——message消息提示
摘要:官方文档:http://element-cn.eleme.io/#/zh-CN/component/message 简单的用法,一句代码搞定。类型有success/warning/info/error
阅读全文
posted @
2018-01-06 21:52
蛋尼
阅读(514)
推荐(0)
js把mysql传过来的时间格式化为:0000-00-00 00:00:00
摘要:mysql传到前端的默认时间:2018-01-06T17:32:23+08:00 格式化的js代码
阅读全文
posted @
2018-01-06 17:57
蛋尼
阅读(596)
推荐(0)
beego orm操蛋问题:操作都需要主键
摘要:查看bee generate appcode自动生成的代码,会发现orm操作都是以主键为依据的。 如果我不想根据主键怎么操作?用 ORM.Raw(cmd).Exec()吧,cmd=[你的mysql语句]
阅读全文
posted @
2018-01-06 16:26
蛋尼
阅读(898)
推荐(0)
element——message-box
摘要:`${action}`可以捕获用户选择cancel还是confirm,然后进行相应操作 官方文档:http://element-cn.eleme.io/#/zh-CN/component/message-box
阅读全文
posted @
2018-01-04 21:00
蛋尼
阅读(301)
推荐(0)
VUE.js全局变量的定义
摘要:模块化之后,想用js全局变量,遇到点困难。搜索资料后搞定,大概2个步骤: 1、定义一个vue模块,const定义变量,并用export对外暴露. Globle.vue 2、在用到全局变量的模块,import后再使用 test.vue 2018/12/27 定义component.js并在main.j
阅读全文
posted @
2018-01-04 17:40
蛋尼
阅读(2125)
推荐(0)
element el-upload组件获取文件名
摘要:组件的连接:http://element-cn.eleme.io/#/zh-CN/component/upload 需求:点x按钮,获取文件名传到后端服务,把文件从服务器删除 分析: 仔细看文档,会发现默认传有两个参数file,fileList,都是object类型;file.name就可以拿到当前
阅读全文
posted @
2018-01-04 16:11
蛋尼
阅读(16321)
推荐(0)
go遍历某个文件夹
摘要:参考:https://www.cnblogs.com/zheng-chuang/p/6193090.html
阅读全文
posted @
2018-01-04 13:31
蛋尼
阅读(334)
推荐(0)