![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java学习
Amberish
我的码龄是两年哎!
展开
-
Unparseable date: “Mar 3, 2023 10:12:08 AM“
Unparseable date: "Mar 3, 2023 10:12:08 AM"原创 2023-03-08 11:13:15 · 405 阅读 · 0 评论 -
导出页面提示“找不到与以下网址对应的网页:http://localhost:8000/sys/embraco/cust-vehicle-queue/download/6081ec88-2339-4f”
页面显示导出提示Preview和Response都没有返回东西,我以为是接口写出bug,开始debug导出接口,一直到最后,接口都能正常返回,但是能返回为啥没写到页面上呢后台部分代码/创建文件夹 File path = new File(reportPath,tempFileName); path.mkdir(); //创建Excel文件 File file = new File(path.getPath(), "report.xlsx"); //创建Excel XSSFWorkbook原创 2022-04-11 14:58:29 · 1411 阅读 · 0 评论 -
使用EasyExcel导出Excel
gradle添加依赖compile 'com.alibaba:easyexcel:2.2.11'导入Excel样例模板代码示例Excel文件导入对应的模板实体,ExcelProperty内容要与导入的Excel列名保持一致,不一致匹配不上package com.yshenghuo.entity.wrapper;import com.alibaba.excel.annotation.ExcelProperty;/** * @description: 检测数据导入 * @author:原创 2022-01-24 09:43:10 · 1074 阅读 · 0 评论 -
list.addAll报错java.lang.UnsupportedOperationException
原来代码 List<MInjuryAccident> submitList = pageGridView.getRows(); List<MInjuryAccident> unSubmitList = accidentSearchRepo.getUnSubmitListByCreateBy(sysUser.getId()); if (unSubmitList != null && unSubmitList.size() >原创 2021-06-17 11:31:00 · 236 阅读 · 0 评论 -
java使用zpl指令在Zebra打印机上打印条形码
参考文章:https://blog.csdn.net/scholar_man/article/details/78784163打印机使用的是斑马打印机条码样式工具类ZplPrinterimport org.springframework.context.EnvironmentAware;import org.springframework.context.annotation.Configuration;import org.springframework.core.env.Environme原创 2021-06-08 14:37:31 · 1976 阅读 · 3 评论 -
根据当前时间(时分秒)判断是否在时间段内
需求:早八点到晚八点是白班,剩下时间段是晚班;该时间点是白班时间段返回true,是晚班时间段返回falsepublic void test(){ //取当前时间 判断是白天还是晚上 SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss"); Date nowTime = df.parse(df.format(new Date())); Date dayTimeStart = df.parse("08:00原创 2020-07-29 16:23:17 · 1380 阅读 · 0 评论 -
定时任务写法
位置:写在service的实现层代码package com.yshenghuo.examination.service.impl;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;import com.yshenghuo.examination.dao.GiftLimitMapper;import com.yshenghuo.examination.entity.GiftLimit;import com.ysh原创 2020-06-11 18:05:37 · 707 阅读 · 0 评论 -
spring学习笔记day_04
spring中的JdbcTemplate基本版本 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</versi...原创 2020-04-16 12:13:49 · 181 阅读 · 0 评论 -
Spring学习笔记day_03
完善Account案例项目代码:链接:https://pan.baidu.com/s/1uT80JFATZzJOoSyK4Ql-Gg提取码:rh7j添加了事务控制 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>j...原创 2020-04-13 11:02:37 · 168 阅读 · 0 评论 -
Spring学习笔记day_02
spring中IOC常用注解component注解曾经xml配置:* <bean id=“accountService” class=“org.example.service.impl.AccountServiceImpl”* scope="" init-method="" destroy-method="" >* * ...原创 2020-04-06 14:39:55 · 144 阅读 · 0 评论