随笔分类 -  工具类

摘要:/*** * @Author: pmy * @Description: PDF转JPG * @Date: 2020/11/18 16:30 * @Params: [is]文件输入流 * @Return byte[]字节数组 */ public static byte[] toJpg(InputStr 阅读全文
posted @ 2021-10-19 09:38 p_小白 阅读(86) 评论(0) 推荐(0)
摘要:import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.Closeable; import java.io.File; 阅读全文
posted @ 2021-01-13 10:27 p_小白 阅读(506) 评论(0) 推荐(0)
摘要:/** * Java8日期时间工具类 * * @author JourWon * @date 2020/12/13 */ public class LocalDateUtils { /** * 显示年月日时分秒,例如 2015-08-11 09:51:53. */ public static fin 阅读全文
posted @ 2021-01-13 09:20 p_小白 阅读(201) 评论(0) 推荐(0)
摘要:/** * 向指定 URL 发送POST方法的请求 * * @param url 发送请求的 URL * @param param 请求参数,json格式,请求参数应该是{name:value1,name2:value2}的形式。 * @return 所代表远程资源的响应结果 * @throws I 阅读全文
posted @ 2020-11-26 13:47 p_小白 阅读(1756) 评论(0) 推荐(0)
摘要:<dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>fontbox</artifactId> <version>2.0.9</version></dependency><!-- https://mvnrepository.com 阅读全文
posted @ 2020-11-18 14:14 p_小白 阅读(636) 评论(0) 推荐(0)
摘要://个人信息 手机号或证件号打码 private String getEncrypt(String number){ //电话 if (number != null && number.length() == 11) { return number.replaceAll("(\\d{3})\\d{4 阅读全文
posted @ 2020-10-13 09:24 p_小白 阅读(1264) 评论(0) 推荐(0)
摘要:package com.zy.handle; /** * Author * <p> * Description: 验证码生成器 工具类 * <p> * Date: 2017/8/29 */ import java.awt.*; import java.awt.image.BufferedImage; 阅读全文
posted @ 2020-07-24 11:07 p_小白 阅读(750) 评论(0) 推荐(0)
摘要:MyBatis 10 种通用的写法 用来循环容器的标签forEach,查看例子 foreach元素的属性主要有item,index,collection,open,separator,close。 item:集合中元素迭代时的别名, index:集合中元素迭代时的索引 open:常用语where语句 阅读全文
posted @ 2020-06-09 09:14 p_小白 阅读(474) 评论(0) 推荐(0)
摘要:proname=/deve/signature?cid= cid&sid=sidif(StringUtils.isNotBlank(proname)) { String[] roles = proname.split("[?]")[0].split("/");//【截取0到?中间的即:/deve/s 阅读全文
posted @ 2020-05-16 12:03 p_小白 阅读(329) 评论(0) 推荐(0)
摘要:package com.centit.tfzc.util.excelUtil; import jxl.Workbook; import jxl.write.Label; import jxl.write.WritableSheet; import jxl.write.WritableWorkbook 阅读全文
posted @ 2020-01-14 14:45 p_小白 阅读(272) 评论(0) 推荐(0)
摘要:/** * @MethodName : setColumnAutoSize * @Description : 设置工作表自动列宽和首行加粗 * @param ws */ private static void setColumnAutoSize(WritableSheet ws, int extra 阅读全文
posted @ 2019-12-02 15:45 p_小白 阅读(833) 评论(0) 推荐(0)
摘要:public class SecurityImage { /** * 生成验证码图片 * @param securityCode 验证码字符 * @return BufferedImage 图片 */ public static BufferedImage createImage(String se 阅读全文
posted @ 2019-12-02 15:40 p_小白 阅读(498) 评论(0) 推荐(0)
摘要:public class pingyin { // 将汉字转换为全拼 public static String getPingYin(String src) { char[] t1 = null; t1 = src.toCharArray(); String[] t2 = null; HanyuPi 阅读全文
posted @ 2019-11-22 13:25 p_小白 阅读(449) 评论(0) 推荐(0)
摘要:(a.`erdat` BETWEEN DATE_SUB(CURDATE(),INTERVAL 3 MONTH) AND CURDATE()) 查询a.erdat在最近三个月之间的数据 阅读全文
posted @ 2019-10-29 10:37 p_小白 阅读(1608) 评论(0) 推荐(0)
摘要:@Transactional(rollbackFor = Exception.class) public boolean repwd(String rowId,String did, String oldPwd, String pwd) throws NoSuchAlgorithmException 阅读全文
posted @ 2019-10-24 10:20 p_小白 阅读(214) 评论(0) 推荐(0)
摘要:1 public SearchResult paging(List<T> list, int pageNumber, int pageSize) throws Exception{ 2 List<T> pageList = new ArrayList<T>(); 3 int currIdx = (p 阅读全文
posted @ 2019-09-04 14:27 p_小白 阅读(2030) 评论(0) 推荐(0)
摘要:1 public class NumberToCNUtil { 2 3 private NumberToCNUtil() { throw new IllegalStateException("Utility class"); } 4 5 /** 6 * 汉语中数字大写 7 */ 8 private 阅读全文
posted @ 2019-07-04 11:12 p_小白 阅读(1070) 评论(0) 推荐(0)
摘要:Spring Validation验证框架对参数的验证机制提供了@Validated(Spring's JSR-303规范,是标准JSR-303的一个变种),javax提供了@Valid(标准JSR-303规范),配合BindingResult可以直接提供参数验证结果。其中对于字段的特定验证注解比如 阅读全文
posted @ 2019-06-25 09:48 p_小白 阅读(1001) 评论(0) 推荐(0)
摘要:1. <if test="keyword!=null and keyword!=''"> AND (m.matnr LIKE concat('%',#{keyword,jdbcType=VARCHAR},'%') OR m.maktx LIKE concat('%',#{keyword,jdbcTy 阅读全文
posted @ 2019-06-24 16:15 p_小白 阅读(2019) 评论(0) 推荐(0)
摘要:1 工具类: 2 import com.github.pagehelper.util.StringUtil; 6 import org.apache.poi.hssf.usermodel.HSSFWorkbook; 7 import org.apache.poi.ss.usermodel.*; 8 阅读全文
posted @ 2019-06-19 18:01 p_小白 阅读(611) 评论(0) 推荐(0)


你再瞅我 还瞅!关注啊