![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
项目问题
uknowzxt
记忆力不好,那就把东西都写出来好了。
展开
-
通过链接下载音频文件到本地
【代码】通过链接下载音频文件到本地。原创 2022-10-26 16:00:28 · 974 阅读 · 1 评论 -
【每天填坑一点点】(一)---为app写接口 尽量不返回给前端null 解决方法
今天前端说,返回给前端太多的null,会导致app闪退。找的解决方案,作如下配置:我们项目用的是spring-boot。第一种:当返回前端null的时候,便不再返回该字段(1)在bean上面加注解import com.fasterxml.jackson.annotation.JsonInclude;@JsonInclude(JsonInclude.Include.NON_NULL)(2)在配置文...原创 2018-03-23 14:31:22 · 3240 阅读 · 0 评论 -
【微信开发】openId不能满足开发需求,需要获取unionId。遇上了一些坑
最近公司需要进行微信公众号开发,要求微信用户点进公众号直接登录,在实现此功能的过程中,遇见了一些坑,写出来记在这里具体文档信息如下两个链接,openId是获取unionId的前提获取用户openId及unionId:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842根据openId获取用户unionId:htt...原创 2018-04-26 16:42:24 · 13320 阅读 · 1 评论 -
截取带有mojo表情、汉字、英文的字符串
单纯使用substring会把字符串截取的不能转换成完整的utf8//截取数量是3int i = nickName.codePointCount(0, nickName.length());//代码点的数量if(i>=3){ nickName = nickName.substring(nickName.offsetByCodePoints(0, 0), ...原创 2019-01-08 11:46:05 · 569 阅读 · 0 评论 -
检查死锁/cpu占用率过高
https://www.cnblogs.com/rsapaper/p/9297804.html原创 2020-08-21 13:57:32 · 351 阅读 · 0 评论 -
深入理解SPI机制
https://www.jianshu.com/p/3a3edbcd8f24转载 2021-01-28 14:15:23 · 202 阅读 · 0 评论 -
面试记录
https://www.jianshu.com/p/5fe981fd4ab9原创 2020-06-17 21:55:58 · 90 阅读 · 0 评论 -
springboot加载外部配置文件-war包直接读取外部配置文件
参考博客地址:https://www.jianshu.com/p/be6c818fe6ff1. springboot支持动态的读取文件,扩展接口:org.springframework.boot.env.EnvironmentPostProcessor我的项目使用场景起因是: 在同一台机器上起了两个tomcat实例, 每个项目的日志文件打印路径要配成不同, 如果每次打包手动修改打印日志的路...原创 2019-07-04 14:21:08 · 7391 阅读 · 0 评论 -
一个简单的秒杀(基于redis)
/** * 秒杀 */ public boolean secKillBubble(Integer bubbleId, Integer userId) { Jedis jedis = getJedis(); Long incr = jedis.incr(RedisConstant.bubbleEntryNum + bubbleId)...原创 2019-01-08 11:54:43 · 121 阅读 · 0 评论 -
dy项目——需求:使用jsonp实现跨域
前端:原理,标签的形式可以实现跨域,但是无法接收接口的返回参数。需要接口直接向页面写出回调方法。//原生:<script> var script = document.createElement('script'); script.type = 'text/javascript'; // 传参并指定回调执行函数为onBack script.sr...原创 2018-07-26 14:48:01 · 248 阅读 · 0 评论 -
dy项目——需求:把area.json文件解析出来
//这里只是单纯打印出来了 public void getAreaJson() throws Exception { String json = ""; InputStream is = PlatformInviteMemberControllerTest.class.getClassLoader().getResourceAsStream("...原创 2018-07-26 14:38:20 · 1459 阅读 · 0 评论