- 博客(14)
- 资源 (1)
- 收藏
- 关注
原创 Java中List集合去除重复数据的方法
第一种:去掉重复乱序List<SectionDirectionControlOrderExport> secDirOrderList = new ArrayList<>();SectionDirectionControlOrderExport secDirOrder = new SectionDirectionControlOrderExport();secDirOr...
2020-04-30 09:30:00 247
原创 用java的itext实现list数据存入pdf文件
第一种:不能分页public class CreatePdf { public static void main(String[] args) throws Exception{ List<ExportBean> beanList = new ArrayList<>(); ExportBean bean = new Export...
2020-04-26 11:24:33 1919 1
原创 JSON与JSONObject互转
JSON转化报错com.alibaba.fastjson.JSONException: can not cast to JSONObject.
2020-04-22 14:09:01 292
原创 Map与json的互转以及Map与Object的互转
mapLinkedHashMap<String,Object> map = new LinkedHashMap<>();List<Integer> NoList = new ArrayList<>();NoList.add(1);NoList.add(2);map.put("promptNrs",NoList);map转json``...
2020-04-09 15:55:05 669
原创 将一个类信息复制到另一个类:spring框架下BeanUtils中的方法copyProperties()
类TestCommandpublic class TestCommand { @ApiModelProperty(value = "导出", example = "1-全部导出;2-选择信息导出",required = true) @NotNull(message = "导出类型不能为空") private Integer exportType;//导出}类Devi...
2020-04-08 10:53:59 782
原创 http接口数据导出到Excel
@RestControllerpackage com.rpmc.controller;import com.rpmc.bean.Result;import com.rpmc.command.*;import com.rpmc.entity.*;import com.rpmc.log.Log;import com.rpmc.log.LogFactory;import com.rpmc...
2020-04-02 19:16:11 1577 1
原创 java应用Swagger实现http接口查询、数据导出
@ApiOperation@ApiOperation不是spring自带的注解是swagger里的com.wordnik.swagger.annotations.ApiOperation;@ApiOperation和@ApiParam为添加的API相关注解,个参数说明如下:@ApiOperation(value = “接口说明”, httpMethod = “接口请求方式”, respons...
2020-04-02 17:40:57 794
原创 二进制string转十进制int
二进制string转十进制intString commStr = "0101";//二进制字符串转十进制intint commDec = Integer.valueOf(commStr,2);
2020-04-02 09:49:14 1726
原创 int型数字转string型字符串
空字符串""和int型0报错:"" + 0String commStr = "";int commList = 0;commStr = commStr + commList;
2020-04-02 09:16:00 175
原创 迭代器类Iterator的next方法
迭代器类(Iterator)next()是java迭代器类(Iterator)的方法,获得当前游标指向的下一个元素,详细说明和应用如下:1、迭代器(Iterator)介绍 迭代器是一种设计模式,它是一个对象,它可以遍历并选择序列中的对象,而开发人员不需要了解该序列的底层结构。迭代器通常被称为“轻量级”对象,因为创建它的代价小。 Java中的Iterator功能比较简单,并且只能单向移动:...
2020-04-01 23:25:04 2246
原创 java读取txt文件
读取TXTpublic static List<String[]> readTxt(String txtName) throws Exception { File directory = new File(""); //项目目录的绝对路径 String mydir = directory.getAbsolutePath(); //项目目录config下...
2020-04-01 17:50:25 219
原创 时间戳的加减、转换及对应数据库查询
时间戳加减、转换long command = 1585711324530;String endDate=Httpservice.timstamp2DateTime(command);String endTable = "d_cbi_history_"+endDate;//判断表是否存在if (dTccHistoryMapper.getTableExist(endTable)==nul...
2020-04-01 11:29:26 631
原创 数据库操作sql语句
删除指定行记录删除id小于19的所有行数据:DELETE FROM d_cbi_history_20200331 WHERE id < 19
2020-04-01 10:00:54 201
如何将虚拟机上Ubuntu桌面全屏.md
2019-12-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人