上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: 1、异常提示: java.lang.ArithmeticException: / by zero 2、原因: 当我们定义的被除数为整型时(short、int、long)会抛出此异常, 被除数为整型时不可为零。 3、解决办法: 检查整型的被除数。 阅读全文
posted @ 2018-05-16 00:54 hapday 阅读(84276) 评论(1) 推荐(1) 编辑
摘要: 1、异常提示: java.lang.NumberFormatException: Infinite or NaN 2、原因:无法格式化的数字,此数字要么不是个数字,要么是无穷大的数字,从而导致 BigDecimal 无法对其解析。 3、解决办法:检查传入到 BigDecimal 的参数是不是数字,或者数字中含有空格。 阅读全文
posted @ 2018-05-16 00:43 hapday 阅读(24546) 评论(0) 推荐(1) 编辑
摘要: 1、异常提示: DEBUG o.s.w.s.m.m.a.ServletInvocableHandlerMethod - Error resolving argument [2] [type=java.lang.Integer] HandlerMethod details: Controller [c 阅读全文
posted @ 2018-05-02 14:30 hapday 阅读(41257) 评论(0) 推荐(0) 编辑
摘要: 表 A 中共有数据 738 条,表 B 中共有数据 16612 条,优化前查询耗时超过 1 分钟,优化后查询耗时缩减至 0.066 秒。经 EXPLAIN 分析发现,优化前 A 表和 B 表采用的是全表扫描的方式,优化后使用了索引从而使查询速度提升了 10 倍以上。优化方法:在 B 表中的外键中加入 阅读全文
posted @ 2018-05-02 14:26 hapday 阅读(1988) 评论(0) 推荐(0) 编辑
摘要: package com.smbea.image; import com.artup.util.image.ImageUtil; import com.itextpdf.text.*; import com.itextpdf.text.pdf.PdfWriter; import lombok.extern.slf4j.Slf4j; import org.junit.Test; import j... 阅读全文
posted @ 2018-04-19 15:19 hapday 阅读(5054) 评论(0) 推荐(0) 编辑
摘要: 1、问题: IntelliJ IDEA 2017.3.5 安装 lombok-plugin-0.17 失败,通过网络下载总是超时; 2、原因:IntelliJ IDEA 2017.3.5 目前还不支持 lombok-plugin 的 0.17 版本; 3、办法:我们可以安装上一个版本 lombok- 阅读全文
posted @ 2018-04-09 15:00 hapday 阅读(924) 评论(0) 推荐(0) 编辑
摘要: 1、问题 Spring MVC 在参数上设置了必填项,post 请求时报 HTTP 400 并且未进入断点,如将“年龄”设置为了必填项: @RequestParam( value="age", required=true, defaultValue=0 ) int age 2、原因:传参时未写完整导 阅读全文
posted @ 2018-04-08 11:00 hapday 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 1、查询 MySQL 的版本: SELECT VERSION(); 2、查询 MySQL 当前使用的字符集: SHOW VARIABLES LIKE '%character%'; 3、查询指定数据库的指定数据表的状态信息(db_test 是数据库,t_text 是数据表): SHOW TABLE STATUS FROM `db_test` LIKE '%t_text%'; 4、查看... 阅读全文
posted @ 2018-03-13 16:54 hapday 阅读(7023) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh # author hapday 2018-03-08 export TOMCAT_HOME=/usr/local/tomcat-pms tomcat_pid=$(ps -ef | grep ${TOMCAT_HOME} | grep -v grep | awk '{print $2}') echo "--------------------" echo "tomcat ... 阅读全文
posted @ 2018-03-08 16:34 hapday 阅读(223) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh # author hapday # date 2018-03-08 echo "以时间日期为名称基准备份 war 包。" date +%Y-%m-%d-%H-%M-%S cp artup-pms.war artup-pms.war_$(date +%Y-%m-%d-%H-%M-%S) 阅读全文
posted @ 2018-03-08 12:03 hapday 阅读(1336) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页