摘要: 使用mybatis时 如果不使用提供的增删改查 自己定义的话 就必须在 配置文件中的 mybatis-plus 配置中 写以下配置 mybatis-plus: configuration: #日志 log-impl: org.apache.ibatis.logging.nologging.NoLog 阅读全文
posted @ 2020-08-11 19:33 傲娇的白狐 阅读(184) 评论(0) 推荐(0)
摘要: 邮件发送: 前言: 前端代码: 后端代码: 配置文件 .yml 或 .properties 获取授权码 所需jar包: 测试结果: 前言: 想要去学习一个新的案例,最好的方法就是复制一下,自己运行一遍。 注:此案例仅为练习使用; 前端代码: <div> <form action="@{/upload 阅读全文
posted @ 2020-08-11 14:18 傲娇的白狐 阅读(140) 评论(0) 推荐(0)
摘要: 项目部署到测试环境之后,偶尔在后台日志会看到这样的日志:Feign status 400 reading XXXX content: 调查后发现是get请求参数太长的缘故,将参数打印出来,发现最长的有12KB,而内嵌tomcat对参数的默认限制是8K,在tomcat的org.apache.coyot 阅读全文
posted @ 2020-08-09 17:48 傲娇的白狐 阅读(154) 评论(0) 推荐(0)
摘要: 查询每天的数据: SELECT COUNT(1) AS countNumber, DATE_FORMAT(createTime,'%Y-%m-%d') AS dateTime FROM testTable GROUP BY DATE_FORMAT(createTime,'%Y-%m-%d') 查询每 阅读全文
posted @ 2020-08-08 14:45 傲娇的白狐 阅读(580) 评论(0) 推荐(0)
摘要: 当天的数据 SELECT * FROM 表 WHERE date(fk_time) = curdate(); 当月的数据 SELECT *FROM 表 WHERE DATE_FORMAT(fk_time,'%Y%m')=DATE_FORMAT(CURDATE( ),'%Y%m') 昨天 SELECT 阅读全文
posted @ 2020-08-08 14:42 傲娇的白狐 阅读(585) 评论(0) 推荐(0)
摘要: server层: year是所需年份 如2020年 public JsonData selvisityear(String year) { if(year==null){ return JsonData.buildSuc("查询失败"); } String[] split=null; // 十二个月 阅读全文
posted @ 2020-08-08 14:34 傲娇的白狐 阅读(247) 评论(0) 推荐(0)
摘要: Parameter index out of range (1 > number of parameters, which is 0) 在写Mybatis遇到了 Parameter index out of range (1 > number of parameters, which is 0)错误 阅读全文
posted @ 2020-08-08 11:40 傲娇的白狐 阅读(346) 评论(0) 推荐(0)
摘要: SSM中,前端搜索条件为空时,value为“”,传值时无法转换为int,会导致加载controller之前就报错,故应把属性值得类型改为Integer,即可接收到null Field error in object 'xxx' on field 'XXX': rejected value []; c 阅读全文
posted @ 2020-08-06 20:36 傲娇的白狐 阅读(11851) 评论(1) 推荐(0)
摘要: 原符号 < <= > >= & ' " 替换符号 &lt; &lt;= &gt; &gt;= &amp; &apos; &quot; 例如: create_date_time &gt;= #{startTime} and create_date_time &lt;= #{endTime} 大于等于 阅读全文
posted @ 2020-08-06 20:14 傲娇的白狐 阅读(4797) 评论(0) 推荐(0)
摘要: 这个错误是因为java获取页面数据的时候,id值可能为空,而int的默认值为0,若想能够接受NULL的值,将int换成integer即可解决。 遇到这个错误就是把参数int 改成Integer 大家以后在springmvc接受参数的时候,尽量不要使用基本数据类型,当然你一定要使用的话,可以把defa 阅读全文
posted @ 2020-08-06 20:06 傲娇的白狐 阅读(5625) 评论(0) 推荐(0)