随笔 - 836  文章 - 1 评论 - 40 阅读 - 102万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  utils

上一页 1 2 3 4 下一页
读取文件 读取项目里面的json
摘要:ClassPathResource resource = new ClassPathResource("properties/post2LazadaTest.json"); File file= = resource.getFile(); JSONArray btnArray = null; //读取文件 Strin... 阅读全文
posted @ 2019-03-21 17:52 lshan 阅读(256) 评论(0) 推荐(0) 编辑
JSR303 分組数据验证的使用 jsr303
摘要:场景1: 验证VO字段 场景2:一个Bean ,需要在不同情况下分别做分组验证 场景3:springboot , 统一验证异常处理(需要在不同情况下分别做分组验证) 场景1: 验证VO字段 Bean: @Data @Document(collection = "booking") public cl 阅读全文
posted @ 2019-01-24 12:17 lshan 阅读(128) 评论(0) 推荐(0) 编辑
PropertiesUtils
摘要:Properties properties = PropertiesLoaderUtils.loadProperties(new ClassPathResource("properties/statusMapping.properties")); //path springboot --> reso 阅读全文
posted @ 2019-01-17 17:32 lshan 阅读(225) 评论(0) 推荐(0) 编辑
将文件写到磁盘
摘要:public class FileUtils { private static final Logger logger = LoggerFactory.getLogger(FileUtils.class); /** * * @param message * @param topath * @param fileName ... 阅读全文
posted @ 2018-11-23 17:18 lshan 阅读(256) 评论(0) 推荐(0) 编辑
XMind8 安装
摘要:参考:https://blog.csdn.net/qq_35911589/article/details/81901868 https://blog.csdn.net/Zjhao666/article/details/80851530 转载自: https://blog.csdn.net/Zjhao 阅读全文
posted @ 2018-11-02 17:32 lshan 阅读(177) 评论(0) 推荐(0) 编辑
自定义BeanUtils beanToMap (bean 转insert sql)
摘要:beanToMap public static <T> Map<String, Object> beanToMap(T t) { Map<String, Object> result = new HashMap<>(); try { Field[] fields = t.getClass().get 阅读全文
posted @ 2018-10-09 18:20 lshan 阅读(534) 评论(0) 推荐(0) 编辑
POI 生成带联动下拉框的excel表格
摘要:参考:https://www.cnblogs.com/cjbbk/p/7527276.html 解决POI3.17 与其它版本的不同的坑:https://blog.csdn.net/Weirdo_zhu/article/details/79912606 3.17 非常详细:https://www.c 阅读全文
posted @ 2018-09-28 19:11 lshan 阅读(2067) 评论(0) 推荐(0) 编辑
JSR 303 - Bean Validation 简介及使用方法
摘要:参考:https://blog.csdn.net/xlgen157387/article/details/46848507 自己写的验证: /** * * @ClassName: BeanValidationUtils * @Description: * @Author: Sea * @Date: 阅读全文
posted @ 2018-09-17 10:11 lshan 阅读(107) 评论(0) 推荐(0) 编辑
DateUtils
摘要:比较实用的一些参考: https://www.cnblogs.com/yaogua/p/8012951.html https://www.cnblogs.com/aston/p/9053201.html DateUtils: import lombok.extern.slf4j.Slf4j; imp 阅读全文
posted @ 2018-09-01 16:54 lshan 阅读(223) 评论(0) 推荐(0) 编辑
Sublime Text 3 安装+注册+汉化
摘要:参考:https://www.cnblogs.com/h--d/p/7555119.html 阅读全文
posted @ 2018-08-28 13:42 lshan 阅读(162) 评论(0) 推荐(0) 编辑
POI 3.17
摘要:发现与之前使用的有些不同 参考:https://www.cnblogs.com/h--d/p/6735110.html 阅读全文
posted @ 2018-08-28 12:16 lshan 阅读(122) 评论(0) 推荐(0) 编辑
JDK8时间格式转换
摘要:private static final ConcurrentMap<String, DateTimeFormatter> FORMATTER_CACHE = new ConcurrentHashMap<>(); private static final int PATTERN_CACHE_SIZE 阅读全文
posted @ 2018-08-28 10:00 lshan 阅读(8587) 评论(0) 推荐(0) 编辑
Sql语句在线转java bean https://www.bejson.com/othertools/sql2pojo/
摘要:https://www.bejson.com/othertools/sql2pojo/ 阅读全文
posted @ 2018-08-27 20:18 lshan 阅读(1096) 评论(0) 推荐(0) 编辑
email 解析 ,发送 邮件
该文被密码保护。
posted @ 2018-08-03 12:30 lshan 阅读(32) 评论(0) 推荐(0) 编辑
InputStream转化为String
摘要:参考:https://blog.csdn.net/lmy86263/article/details/60479350eg: InputStream in = PropertiesUtils.class.getResourceAsStream("/properties/milestoneTest.text"); response = new... 阅读全文
posted @ 2018-07-18 13:35 lshan 阅读(1035) 评论(0) 推荐(0) 编辑
httpUtils json, 表单提交, 文件上传
摘要:推荐另外一个工具: OKHttpUtil 功能 根据URL自动判断是请求HTTP还是HTTPS,不需要单独写多余的代码。 默认情况下Cookie自动记录,比如可以实现模拟登录,即第一次访问登录URL后后续请求就是登录状态。 自动识别304跳转并二次请求 支持代理配置 支持referer配置 支持Us 阅读全文
posted @ 2018-07-13 20:25 lshan 阅读(569) 评论(0) 推荐(0) 编辑
常用工具的依赖
摘要:<!-- 依赖的jar包 --> <dependencies> <!-- 时间操作组件 --> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> </dependency> <!-- Apache 阅读全文
posted @ 2018-07-07 23:08 lshan 阅读(259) 评论(0) 推荐(0) 编辑
joda-time的使用
摘要:值得一提的是该功能被整合到Java 8 中 ,被称为java8 新特新之一 。这意味着不用到包 <!-- 时间操作组件 --> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> </depende 阅读全文
posted @ 2018-07-07 22:57 lshan 阅读(738) 评论(0) 推荐(0) 编辑
Java各种Utils小结
摘要:原文地址:http://trinea.iteye.com/blog/1533616 最新内容建议直接访问原文:Android常用的工具类 主要介绍总结的Android开发中常用的工具类,大部分同样适用于Java。 目前包括HttpUtils、DownloadManagerPro、ShellUtils 阅读全文
posted @ 2018-06-24 18:36 lshan 阅读(567) 评论(0) 推荐(0) 编辑
Java 8 新特新 工具类 ZonedDateTime
摘要:类ZonedDateTime 类ZonedDateTime java.lang.Object继承 java.time.ZonedDateTime 所有实现的接口:Serializable,Comparable < ChronoZonedDateTime <?>>,ChronoZonedDateTim 阅读全文
posted @ 2018-06-24 18:17 lshan 阅读(7101) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 下一页
点击右上角即可分享
微信分享提示