随笔分类 -  java

java后台
摘要:首先需要导入jar 引入包 maven 引入greemarker模板 <!-- freemarker jar --> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version 阅读全文
posted @ 2020-08-03 14:26 wc_nan 阅读(1034) 评论(0) 推荐(0)
摘要:java代码 public void htmlToWord2() throws Exception { InputStream bodyIs = new FileInputStream("f:\\1.html"); InputStream cssIs = new FileInputStream("f 阅读全文
posted @ 2020-07-29 15:58 wc_nan 阅读(3620) 评论(0) 推荐(0)
摘要://定义一个变量 String str="0" //这个校验为整数 str.matches("\\d+") //这个校验为浮点数 str.matches("\\d+\\.\\d*"); 阅读全文
posted @ 2020-06-10 16:40 wc_nan 阅读(1464) 评论(0) 推荐(0)
摘要:package com.code.modules.roaddiseasecontroller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.code.modules.utils 阅读全文
posted @ 2020-06-01 18:38 wc_nan 阅读(252) 评论(0) 推荐(0)
摘要:package com.code.modules.roaddiseasecontroller; import com.alibaba.fastjson.JSON; import java.io.DataInputStream; import java.io.DataOutputStream; imp 阅读全文
posted @ 2020-05-29 15:06 wc_nan 阅读(169) 评论(0) 推荐(0)
摘要:服务器 package com.code.modules.roaddiseasecontroller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.code.modules.u 阅读全文
posted @ 2020-05-29 15:02 wc_nan 阅读(228) 评论(0) 推荐(0)
摘要://list 对象 交集差集 List<Map> newList = list.stream().filter(one -> { List<Boolean> result = hisList.stream().map(two -> one.toString().equals(two.toString 阅读全文
posted @ 2020-03-30 14:35 wc_nan 阅读(1035) 评论(0) 推荐(0)
摘要:需求: 在tomcat中,每月一号、每日、每分钟自动执行指定的任务。 开发环境: java1.7 + tomcat 实现思路: 在tomcat中,添加监听器,在监听器中设置定时任务。 1.监听: 新建监听类implents ServletContextListener,实现其中的方法即可。 讲解: 阅读全文
posted @ 2020-03-23 18:49 wc_nan 阅读(4622) 评论(0) 推荐(0)
摘要:非本人原创 阅读全文
posted @ 2019-11-06 14:48 wc_nan 阅读(4053) 评论(0) 推荐(0)
摘要:public static void main(String[] args) { File[] srcFiles = { new File("E:\\testZip\\testZip.zip"), new File("E:\\testZip\\test2.json"), new File("E:\\testZip\\test3.txt") }; File zipFile = new File("E 阅读全文
posted @ 2019-11-05 18:17 wc_nan 阅读(270) 评论(0) 推荐(0)
摘要:标注:抄袭 阅读全文
posted @ 2019-10-29 17:40 wc_nan 阅读(8384) 评论(0) 推荐(0)
摘要:所需要的jar 链接: https://pan.baidu.com/s/1leGzU926VD0Nkovqlh9Wvw 提取码: nwfp 参考的链接 https://blog.csdn.net/qq_29301417/article/details/78904373 注:简单的可以转换,中文会有乱 阅读全文
posted @ 2019-08-22 14:31 wc_nan 阅读(367) 评论(0) 推荐(0)
摘要:/** * 获取指定年月的第一天 * * @param year * @param month * @return */ public static String getFirstDayOfMonth1(int year, int month) { Calendar cal = Calendar.getInsta... 阅读全文
posted @ 2019-03-07 15:17 wc_nan 阅读(362) 评论(0) 推荐(0)
摘要:public class Base58 { private static final char[] ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" .toCharArray(); private static final int BASE_58 = ALPHAB... 阅读全文
posted @ 2018-11-16 14:19 wc_nan 阅读(1017) 评论(0) 推荐(0)
摘要:使用jacob 插件 链接: https://pan.baidu.com/s/1un6Hb2P4y3OhI3iHOgldrg 密码: j5v8 这是jacob 插件下载地方 有需要的可以自行下载 使用: 首先 将文件中 jacob-1.19-x86.dll 、jacob-1.19-x64.dll 文 阅读全文
posted @ 2018-09-17 17:02 wc_nan 阅读(1020) 评论(0) 推荐(0)
摘要:1、找到idea 安装目录 D:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0.2\bin 2、idea64.exe.vmoptions 打开这个文件 3、改变文件里面的参数 -Xms512m-Xmx2000m-XX:MaxPermSize=350 阅读全文
posted @ 2018-06-05 10:32 wc_nan 阅读(2803) 评论(0) 推荐(0)
摘要://用户重组数据 List lstName = new ArrayList(); int num = 0; //次数 //获取返回结果中的数据 Map list1 = null; if (data.size() > 0) { //循环结果集中的数据 for (int i = 0; i < data. 阅读全文
posted @ 2018-02-01 13:39 wc_nan 阅读(623) 评论(0) 推荐(0)
摘要:java /** * 分页实体类 * @version [版本号, Nov 9, 2011] */public class Page { private int currentPage;//当前页 private int pageSize; //分页大小 private int totalNum; 阅读全文
posted @ 2017-07-27 14:57 wc_nan 阅读(884) 评论(0) 推荐(0)
摘要:map.entrySet().iterator() 效率高 以后一定要使用此种方式map.keySet().iterator(); 效率低,以后尽量少使用 HashMap 的实现原理HashMap 是基于哈希表的 Map 接口的非同步实现。此实现提供所有可选的映射操作,并允许使用 null 值和 n 阅读全文
posted @ 2017-07-27 14:55 wc_nan 阅读(165) 评论(0) 推荐(0)
摘要:Map.Entry使用详解1.Map.Entry说明 Map是java中的接口,Map.Entry是Map的一个内部接口。 Map提供了一些常用方法,如keySet()、entrySet()等方法,keySet()方法返回值是Map中key值的集合;entrySet()的返回值也是返回一个Set集合 阅读全文
posted @ 2017-07-27 14:53 wc_nan 阅读(153) 评论(0) 推荐(0)