08 2020 档案

摘要:0. 背景 Docker 中创建 mysql 容器 1.创建MySQL容器 docker run -di --name mysql -p 33306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql -p 代表端口映射,格式为 宿主机映射端口:容器运行端口 -e 代表 阅读全文
posted @ 2020-08-31 20:03 傲娇的白狐 阅读(228) 评论(0) 推荐(0)
摘要:出现这种 就 添加 以下代码 CellType.STRING string 类型 row.getCell(0).setCellType(CellType.STRING); CellType.NUMERIC 数字单元格类型(整数,小数,日期) row.getCell(1).setCellType(Ce 阅读全文
posted @ 2020-08-26 18:18 傲娇的白狐 阅读(979) 评论(0) 推荐(0)
摘要:var date = new Date(); date .getYear(); //获取当前年份(2位) date .getFullYear(); //获取完整的年份(4位) date .getMonth(); //获取当前月份(0-11,0代表1月) date .getDate(); //获取当前 阅读全文
posted @ 2020-08-17 20:34 傲娇的白狐 阅读(554) 评论(0) 推荐(0)
摘要:前端获取json数据 后端写成这样的话 @RequestMapping("/insertreimbursement") @ResponseBody public String insertreimbursement(Reimbursement reimbursement,HttpSession se 阅读全文
posted @ 2020-08-13 20:23 傲娇的白狐 阅读(278) 评论(0) 推荐(0)
摘要:事务和注解方式注解 使用mybatis 方式 用bean注入的方式: 配置文件: applieationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/sc 阅读全文
posted @ 2020-08-12 14:45 傲娇的白狐 阅读(220) 评论(0) 推荐(0)
摘要:使用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 傲娇的白狐 阅读(159) 评论(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 傲娇的白狐 阅读(590) 评论(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 傲娇的白狐 阅读(11863) 评论(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 傲娇的白狐 阅读(4807) 评论(0) 推荐(0)
摘要:这个错误是因为java获取页面数据的时候,id值可能为空,而int的默认值为0,若想能够接受NULL的值,将int换成integer即可解决。 遇到这个错误就是把参数int 改成Integer 大家以后在springmvc接受参数的时候,尽量不要使用基本数据类型,当然你一定要使用的话,可以把defa 阅读全文
posted @ 2020-08-06 20:06 傲娇的白狐 阅读(5641) 评论(0) 推荐(0)
摘要:错误信息: Caused by: org.attoparser.ParseException: Could not parse as expression: " {type: "checkbox", width: "80"}, {field: "id", title: "用户ID", width: 阅读全文
posted @ 2020-08-05 09:52 傲娇的白狐 阅读(1447) 评论(0) 推荐(0)
摘要:window.refresh window.reload是重新加载当前需要的所有内容,也就包括页面和后台的代码,此过程中实际上是从后台重新进行操作; window.refresh是刷新,保留之前的缓存内容,重新加载页面,之前存在的东西不会动,没加载上来的东西继续加载,也会去加载后台代码内容的。 阅读全文
posted @ 2020-08-03 18:11 傲娇的白狐 阅读(168) 评论(0) 推荐(0)