java8 stream API
摘要:java8 Arrays 的使用 Stream<String> stream = Stream.of("a","b","c"); List<String> upperList = stream.parallel() .map(String::toUpperCase) .collect(Collect
阅读全文
posted @
2019-05-30 18:43
lshan
阅读(158)
推荐(0) 编辑
JVM调优总结 -Xms -Xmx -Xmn -Xss
摘要:请参考原文(此处仅仅转发):https://www.cnblogs.com/likehua/p/3369823.html 堆大小设置JVM 中最大堆大小有三方面限制:相关操作系统的数据模型(32-bt还是64-bit)限制;系统的可用虚拟内存限制;系统的可用物理内存限制。32位系统下,一般限制在1.
阅读全文
posted @
2019-05-29 11:30
lshan
阅读(248)
推荐(0) 编辑
JAVA8之妙用Optional解决判断Null为空的问题
摘要:请参考原文:http://www.ibloger.net/article/3209.html 这种写法是比较丑陋的,为了避免上述丑陋的写法,让丑陋的设计变得优雅。JAVA8提供了Optional类来优化这种写法,接下来的正文部分进行详细说明 实战: 使用最多: API介绍 1、Optional(T
阅读全文
posted @
2019-05-27 15:53
lshan
阅读(4339)
推荐(0) 编辑
ZipUtils
摘要:package com.sea.elsardcservice.untils; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import j
阅读全文
posted @
2019-05-20 15:07
lshan
阅读(144)
推荐(0) 编辑
HttpServletResponse 的使用
摘要:场景:避免一些简单的响应数据,需要手动封装放回对象 response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "haha 系统崩了");
阅读全文
posted @
2019-05-20 12:03
lshan
阅读(913)
推荐(0) 编辑
Listener 监听器
摘要://ContextRefreshedEvent ----spring 容器初始化完毕的一个事件,及监听加载完毕后的事件 public class ListenerTest implements ApplicationListener{ //注入 要监听的对象 @Autowired private GroupByCourier groupByCourier; ...
阅读全文
posted @
2019-05-16 14:33
lshan
阅读(132)
推荐(0) 编辑
ListUtils 对 list数据 分组 ,统计,求和 。。。
摘要:listUtils: package com.icil.report.utils; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.H
阅读全文
posted @
2019-05-14 13:05
lshan
阅读(4221)
推荐(0) 编辑
java8 list<T>数据过滤,分组 统计
摘要:传统方式:ListUtil.java public class ListUtil{ private static Logger LOGGER=LoggerFactory.getLogger(ListUtil.class); /** * 分组依据接口,用于集合分组时,获取分组 * T为要groupBy
阅读全文
posted @
2019-05-13 15:44
lshan
阅读(14909)
推荐(0) 编辑
java8 stream API
摘要:参考博客: https://www.jianshu.com/p/9fe8632d0bc2 参考:https://www.cnblogs.com/xumBlog/p/9507936.html Stream 简介 Java 8 引入了全新的 Stream API。这里的 Stream 和 I/O 流不同
阅读全文
posted @
2019-05-05 17:58
lshan
阅读(240)
推荐(0) 编辑
java idea 代码规范插件
摘要:推荐阿里的 p3c https://github.com/alibaba/p3c
阅读全文
posted @
2019-04-23 15:09
lshan
阅读(174)
推荐(0) 编辑
读取配置文件properties的几种方式
摘要:// Properties properties = PropertiesLoaderUtils.loadAllProperties("properties/LazadaStatusMapping.properties"); Properties properties = PropertiesLoa
阅读全文
posted @
2019-02-14 14:33
lshan
阅读(1991)
推荐(0) 编辑
Callable和Future 多线程
摘要:参考:https://www.cnblogs.com/fengsehng/p/6048609.html
阅读全文
posted @
2018-12-20 13:53
lshan
阅读(117)
推荐(0) 编辑
java 设计模式http://www.runoob.com/design-pattern/design-pattern-tutorial.html
摘要:参考:http://www.runoob.com/design-pattern/design-pattern-tutorial.html
阅读全文
posted @
2018-12-18 18:27
lshan
阅读(144)
推荐(0) 编辑
JVM知识点总结
摘要:jvm 调优参考: https://www.cnblogs.com/csniper/p/5592593.html 1.JVM以及GC JVM分为:虚拟机栈、本地方法栈、堆、方法区、程序计数器 本地方法栈:用于支持native方法的执行,存储了每个native方法的执行状态。 虚拟机栈 :占用的是操作
阅读全文
posted @
2018-12-03 11:33
lshan
阅读(152)
推荐(0) 编辑
HttpServletRequest 通用的post 请求
摘要:@Context private MessageContext context; public HttpServletRequest getRequest(){ HttpServletRequest request = (HttpServletRequest) context .get(Abstra
阅读全文
posted @
2018-11-30 15:25
lshan
阅读(941)
推荐(0) 编辑
List转数组
摘要:eg: List<Product> products = new ArrayList<Product>(); Product[] array = products.toArray(new Product[products.size()]);
阅读全文
posted @
2018-11-29 12:09
lshan
阅读(133)
推荐(0) 编辑
POI解析大量数据
摘要:参考:https://blog.csdn.net/whandgdh/article/details/80267674 https://www.cnblogs.com/swordfall/p/8298386.html
阅读全文
posted @
2018-11-27 11:50
lshan
阅读(149)
推荐(0) 编辑
EasyExcel 读写 excel easyexcel web base64
摘要:官网: https://github.com/alibaba/easyexcel 直接看官网吧,下面做备份. 参考:https://blog.csdn.net/jiangjiandecsd/article/details/81115622 https://blog.csdn.net/jiangguj
阅读全文
posted @
2018-11-26 13:50
lshan
阅读(1002)
推荐(0) 编辑
POI 读写大数据量 EXCEL
摘要:参考:https://www.cnblogs.com/tootwo2/p/6683143.html
阅读全文
posted @
2018-11-26 11:51
lshan
阅读(266)
推荐(0) 编辑
java 调用短信 api 接口发送短信
摘要:参考: https://blog.csdn.net/u014793522/article/details/59062014 参考 ;https://blog.csdn.net/Lu_shilusiqi/article/details/82118136 参考:https://blog.csdn.net
阅读全文
posted @
2018-11-13 16:30
lshan
阅读(370)
推荐(0) 编辑