上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

2020年6月15日

RESTful

摘要: RESTful风格API的好处 看Url就知道要什么资源 看http method就知道针对资源干什么 看http status code就知道结果如何 RESTful是面向资源的(名词) REST 通过 URI 暴露资源时,会强调不要在 URI 中出现动词。比如: 复杂url获取某个员工某个月的薪 阅读全文

posted @ 2020-06-15 11:58 1zfang1 阅读(157) 评论(0) 推荐(0) 编辑

2020年5月20日

签到功能二进制实现

摘要: 思路 一个月最多31天,四个字节有32位,每个bit位代表一天,签到则置为1,默认是0代表没签到 例: import java.util.Calendar; /** * 签到工具类 */ public class SigningManager { private int element; publi 阅读全文

posted @ 2020-05-20 15:50 1zfang1 阅读(538) 评论(0) 推荐(0) 编辑

2020年4月21日

编译原理随笔

摘要: 1.2 编译器的结构 分析(analysis) 综合(synthesis) 一个编译器的各个步骤 1.2.1 词法分析 编译器的第一个步骤称为词法分析(lexical analysis)或扫描( scanning)。词法分析器读人组成源程序的字符流,并且将它们组织成为有意义的词素(lexeme)的序 阅读全文

posted @ 2020-04-21 08:13 1zfang1 阅读(156) 评论(0) 推荐(0) 编辑

2020年4月20日

微信小程序支付

摘要: 基础信息 appId appSecret mchID keynotifyUrl certPath = classpath:cert/apiclient_cert.p12 证书说明 欢迎使用微信支付!附件中的三份文件(证书pkcs12格式、证书pem格式、证书密钥pem格式),为接口中强制要求时需携带 阅读全文

posted @ 2020-04-20 13:52 1zfang1 阅读(309) 评论(0) 推荐(0) 编辑

2020年4月13日

递归

摘要: List<ZlCategory> list = zlCategoryService.findAll(); List<ZlCategory> rootList = new ArrayList<>(); list.forEach(c -> { if (c.getParentId().equals(0L) 阅读全文

posted @ 2020-04-13 17:21 1zfang1 阅读(143) 评论(0) 推荐(0) 编辑

2020年4月3日

HttpUtils

摘要: import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.StringUtils; import org.apache.http.Consts; 阅读全文

posted @ 2020-04-03 14:33 1zfang1 阅读(1262) 评论(0) 推荐(0) 编辑

2020年3月21日

js

摘要: js动态添加元素并给元素添加事件 $('#specification_div').delegate($('input[type="radio"]'),'change',function() {}); js动态上传文件 如图: 1 <script type="text/javascript" char 阅读全文

posted @ 2020-03-21 11:17 1zfang1 阅读(174) 评论(0) 推荐(0) 编辑

2020年3月17日

mybatis

摘要: mybatis 1对1 1对多 字段重名问题 在配置文件中,sql语句联合查询时使用字段别名,resultMap中对应的column属性使用相应的别名 例子: 表: ZsZf2Mapper.xml 注意pojo中使用Transient 扩展association和collection同时使用 <re 阅读全文

posted @ 2020-03-17 19:26 1zfang1 阅读(104) 评论(0) 推荐(0) 编辑

2019年12月26日

数据分片 + 读写分离

摘要: 数据分片 + 读写分离 https://shardingsphere.apache.org/index_zh.html 阅读全文

posted @ 2019-12-26 17:24 1zfang1 阅读(177) 评论(0) 推荐(0) 编辑

2019年12月11日

生成码

摘要: 1 DigestUtils.md5Hex(UUID.randomUUID() + RandomStringUtils.randomAlphabetic(30)).toUpperCase() 阅读全文

posted @ 2019-12-11 17:10 1zfang1 阅读(382) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

导航