摘要: 1.方式一 import java.io.UnsupportedEncodingException; import java.util.Base64; // byte[]转base64 String base64Str = Base64.getEncoder().encodeToString(byt 阅读全文
posted @ 2020-07-22 17:50 山兮木 阅读(7044) 评论(0) 推荐(1) 编辑
摘要: Spring DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144 通过配置参数加大缓冲区 默认的缓冲区为256K,可以通过配置spring.codec.max-in-memory-size加大缓冲区: sp 阅读全文
posted @ 2020-07-22 17:44 山兮木 阅读(5881) 评论(0) 推荐(0) 编辑
摘要: 使用idea在DEBUG的时候出现Method breakpoints may dramatically slow down debugging, 如图: 根据语义可能是断点打在方法上面了,导致在某个断点卡住了。 重启服务器和重启idea已然无解。 打开Breakpoints面板看看,(快捷键:Ct 阅读全文
posted @ 2020-07-14 10:45 山兮木 阅读(2484) 评论(0) 推荐(0) 编辑
摘要: 1、创建函数索引的语法,如下表示为表的指定字段的upper函数创建了一个函数索引CREATE INDEX 索引名 ON 表名 (upper(字段名)); 2、使用场景:如果某张表的数据量很大,而其中某个字段在当前数据库中保存大小写共存,当需要查询的时候忽略大小写,那么此时一般使用到的方法就是使用sq 阅读全文
posted @ 2020-07-14 10:29 山兮木 阅读(2741) 评论(0) 推荐(0) 编辑
摘要: #### SQL写法: SELECT 1 FROM table WHERE a = 1 AND b = 2 LIMIT 1 #### Java写法: Integer exist = xxDao.existXxxxByXxx(params); if ( exist != NULL ) { //当存在时 阅读全文
posted @ 2020-07-13 09:28 山兮木 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 做加密时,传到后台出现%20 %3D等,导致解密错误,原因是特殊字符被转义编码,解决方案: try { ciphertext = URLDecoder.decode(ciphertext,"UTF-8"); } catch (UnsupportedEncodingException e) { e.p 阅读全文
posted @ 2020-07-07 14:09 山兮木 阅读(2507) 评论(0) 推荐(0) 编辑
摘要: 转载自 https://www.lanhusoft.com/Article/655.html 最近在做token用DES加密解密的时候遇到扰人的报错 。 加密没有问题,解密有时候会出现下面问题: Input length must be multiple of 8 when decrypting w 阅读全文
posted @ 2020-07-06 10:14 山兮木 阅读(14513) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/jinjidedale/p/9456550.html https://blog.csdn.net/m0_38129335/article/details/80047034 阅读全文
posted @ 2020-07-04 10:08 山兮木 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 方式一:利用map的entrySet()方法 <insert id="XXX" parameterType="java.util.Map"> INSERT INTO table(a, b) VALUES <foreach collection="param.entrySet()" open="(" 阅读全文
posted @ 2020-07-02 14:33 山兮木 阅读(6102) 评论(0) 推荐(0) 编辑
摘要: 一 Map对象中的keySet()和entrySet() 1. keySet() public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); map.put("01 阅读全文
posted @ 2020-07-02 14:30 山兮木 阅读(798) 评论(0) 推荐(0) 编辑
/* 看板娘 */