网站做系统叫什么软件,wordpress 自定义域,宝塔面板搭建wordpress,wordpress百度百家模板概述
Hutool是一个Java工具包,提供了丰富的工具类和方法,目的是简化开发任务提高开发效率;适用于需要快速开发和实现多种功能的场景,适合项目需要处理字符串、日期、文件等常见任务时~ toBeBetterJavaer/docs/common-tool/StringUtils.md at master itwanger/toBeBetterJavae…概述
Hutool是一个Java工具包,提供了丰富的工具类和方法,目的是简化开发任务提高开发效率;适用于需要快速开发和实现多种功能的场景,适合项目需要处理字符串、日期、文件等常见任务时~ toBeBetterJavaer/docs/common-tool/StringUtils.md at master · itwanger/toBeBetterJavaer · GitHubGuava是Google开发的Java工具库,提供了一系列核心库的扩展,包括集合、字符串、缓存、异常验证、I/O 流操作等;适用于需要高性能集合操作、复杂缓存策略、并发编程等场(实际项目开发中我们使用Guava作为本地缓存的实现) https://github.com/itwanger/toBeBetterJavaer/blob/master/docs/common-tool/guava.md Java 本地缓存之Guava Cache_本地缓存 guavacache-CSDN博客Apache Commons是Apache软件基金会提供的一组Java工具库, 由于其稳定性和广泛的应用经常被采用 toBeBetterJavaer/docs/common-tool/StringUtils.md at master · itwanger/toBeBetterJavaer · GitHub可根据项目的具体需求和团队的技术栈来选择使用 Hutool或Guava或其他。在某些情况下需要结合使用,以发挥各自的优势~ 项目实践
package com.bierce;import java.awt.Color;
import java.awt.Font;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.lang.reflect.Constructor;
import java.util.Date;import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.BetweenFormater;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.Zodiac;
import cn.hutool.core.img.ImgUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.ZipUtil;
import cn.hutool.crypto.SecureUtil;public class HutoolsTest {public static void main(String[] args) {//一. Hutool 工具包实践 https://github.com/itwanger/toBeBetterJavaer/blob/master/docs/common-tool/hutool.md//1. 类型转换String numStr 22;int num Convert.toInt(numStr, 0); // 22//2. Md5加密String myPwd bishuai123;String md5MyPwd SecureUtil.md5().digestHex(myPwd); // 9cf7b74f75eb22be5af45ccfed7093a5//3. 日期处理String dateStr 2020-09-29 22:33:23;Date writeTextDate DateUtil.parse(dateStr);Date todayDate DateUtil.date();long betweenDay DateUtil.between(writeTextDate, todayDate, DateUnit.MS);String formatBetween DateUtil.formatBetween(betweenDay, BetweenFormater.Level.SECOND);System.out.println(formatBetween formatBetween); //格式化时间差: 1359天19小时3分34秒//星座和属相String zodiac Zodiac.getZodiac(DateUtil.parse(1995-03-18));System.out.println(星座 zodiac); // 双鱼座String chineseZodiac Zodiac.getChineseZodiac(DateUtil.parse(1995-02-18));System.out.println(属相 chineseZodiac); // 猪//4. IO 流相关-网络操作和文件操作(文件目录的新建、删除、复制、移动、改名\判断文件或目录是否非空是否为目录是否为文件等)BufferedInputStream in FileUtil.getInputStream(hutool/origin.txt);BufferedOutputStream out FileUtil.getOutputStream(hutool/to.txt); //默认输出项目路径\target\test-classeslong copySize IoUtil.copy(in, out, IoUtil.DEFAULT_BUFFER_SIZE);System.out.println(copySize copySize);//5. 字符串工具,和 Apache Commons Lang 包中的 StringUtils 类似//6. 反射工具// 构建对象HutoolsTest hutoolsTest ReflectUtil.newInstance(HutoolsTest.class);System.out.println(hutoolTest hutoolsTest);// 获取构造方法ConstructorHutoolsTest[] constructors ReflectUtil.getConstructors(HutoolsTest.class);for (Constructor constructor : constructors) {System.out.println(constructor.getName());}//7. 压缩工具ZipUtil.zip(hutool, hutool.zip);//默认输出项目路径\target\test-classesFile unzip ZipUtil.unzip(hutool.zip, hutoolzip);//默认输出项目路径\target\test-classes//8. 身份证工具: 支持大陆 15 位、18 位身份证港澳台 10 位身份证String ID_18 321083197812162119;boolean valid IdcardUtil.isValidCard(ID_18);// 是否有效 true//9. 控制台打印Console.log(墨行子一枚有趣的程序员);// 打印字符串 墨行子一枚有趣的程序员Console.log(西安是{}朝古都,13);// 打印字符串模板 西安是13朝古都int [] ints {1,2,3,4};Console.log(ints);// 打印数组 [1, 2, 3, 4]//10. 字段验证器(是不是邮箱/IP V4、V6/电话号码等等)boolean isEmail Validator.isEmail(墨行子); // isEmail falseboolean isMobile Validator.isMobile(itwanger.com); // isMobile falseboolean isIPV4 Validator.isIpv4(192.168.56.1); // isIPV4 true//11. 图片工具( ImgUtil 可以对图片进行缩放、裁剪、转为黑白、加水印等操作)ImgUtil.pressText(//FileUtil.file(hutool/snow.jpg),FileUtil.file(hutool/snow2.jpg),墨行子, Color.RED,new Font(黑体, Font.BOLD, 50),0,0,0.8f); // 输出文件路径: \target\test-classes\hutool//12. 加密解密(对称加密AES、DES,非对称RSA,摘要加密MD5、SHA-256等)String encry SecureUtil.md5().digestHex(墨行子); //Md5加密: 8c4c11f5b8391b2eebbad4a9a0436e4e//二. 其他常用工具包//1. Apache commons工具包; 地址https://github.com/itwanger/toBeBetterJavaer/blob/master/docs/common-tool/StringUtils.md//2. guava 工具包; 地址https://github.com/itwanger/toBeBetterJavaer/blob/master/docs/common-tool/guava.md//3. 其他常用Java工具类IpUtil、MDC、ClassUtils、BeanUtils、ReflectionUtils; 地址https://github.com/itwanger/toBeBetterJavaer/blob/master/docs/common-tool/utils.md}}
文章转载自: http://www.morning.pgjyc.cn.gov.cn.pgjyc.cn http://www.morning.fnczn.cn.gov.cn.fnczn.cn http://www.morning.rcwzf.cn.gov.cn.rcwzf.cn http://www.morning.hnrqn.cn.gov.cn.hnrqn.cn http://www.morning.dpgdj.cn.gov.cn.dpgdj.cn http://www.morning.bbgr.cn.gov.cn.bbgr.cn http://www.morning.glrzr.cn.gov.cn.glrzr.cn http://www.morning.zqcdl.cn.gov.cn.zqcdl.cn http://www.morning.xdjsx.cn.gov.cn.xdjsx.cn http://www.morning.tkgxg.cn.gov.cn.tkgxg.cn http://www.morning.kpmxn.cn.gov.cn.kpmxn.cn http://www.morning.rsbqq.cn.gov.cn.rsbqq.cn http://www.morning.ljdhj.cn.gov.cn.ljdhj.cn http://www.morning.yrjfb.cn.gov.cn.yrjfb.cn http://www.morning.tmcmj.cn.gov.cn.tmcmj.cn http://www.morning.kncrc.cn.gov.cn.kncrc.cn http://www.morning.lgmgn.cn.gov.cn.lgmgn.cn http://www.morning.mkrjf.cn.gov.cn.mkrjf.cn http://www.morning.wrdlf.cn.gov.cn.wrdlf.cn http://www.morning.zkqwk.cn.gov.cn.zkqwk.cn http://www.morning.mdjzydr.com.gov.cn.mdjzydr.com http://www.morning.qdmdp.cn.gov.cn.qdmdp.cn http://www.morning.jjhng.cn.gov.cn.jjhng.cn http://www.morning.jtcq.cn.gov.cn.jtcq.cn http://www.morning.pynzj.cn.gov.cn.pynzj.cn http://www.morning.nflpk.cn.gov.cn.nflpk.cn http://www.morning.jqsyp.cn.gov.cn.jqsyp.cn http://www.morning.jpjpb.cn.gov.cn.jpjpb.cn http://www.morning.tbqxh.cn.gov.cn.tbqxh.cn http://www.morning.kxgn.cn.gov.cn.kxgn.cn http://www.morning.burpgr.cn.gov.cn.burpgr.cn http://www.morning.jbgzy.cn.gov.cn.jbgzy.cn http://www.morning.crkmm.cn.gov.cn.crkmm.cn http://www.morning.kjgrg.cn.gov.cn.kjgrg.cn http://www.morning.dmxzd.cn.gov.cn.dmxzd.cn http://www.morning.xltdh.cn.gov.cn.xltdh.cn http://www.morning.wfbnp.cn.gov.cn.wfbnp.cn http://www.morning.bpkqd.cn.gov.cn.bpkqd.cn http://www.morning.qnhpq.cn.gov.cn.qnhpq.cn http://www.morning.mmjqk.cn.gov.cn.mmjqk.cn http://www.morning.rdlong.com.gov.cn.rdlong.com http://www.morning.cfjyr.cn.gov.cn.cfjyr.cn http://www.morning.rbnj.cn.gov.cn.rbnj.cn http://www.morning.wrtbx.cn.gov.cn.wrtbx.cn http://www.morning.kmcby.cn.gov.cn.kmcby.cn http://www.morning.rblqk.cn.gov.cn.rblqk.cn http://www.morning.pbpcj.cn.gov.cn.pbpcj.cn http://www.morning.pwmm.cn.gov.cn.pwmm.cn http://www.morning.lnbcx.cn.gov.cn.lnbcx.cn http://www.morning.rynqh.cn.gov.cn.rynqh.cn http://www.morning.cfynn.cn.gov.cn.cfynn.cn http://www.morning.xqltq.cn.gov.cn.xqltq.cn http://www.morning.mnjwj.cn.gov.cn.mnjwj.cn http://www.morning.jkcnq.cn.gov.cn.jkcnq.cn http://www.morning.csnmd.cn.gov.cn.csnmd.cn http://www.morning.cgntj.cn.gov.cn.cgntj.cn http://www.morning.hqnsf.cn.gov.cn.hqnsf.cn http://www.morning.bzlgb.cn.gov.cn.bzlgb.cn http://www.morning.rnwt.cn.gov.cn.rnwt.cn http://www.morning.jybj.cn.gov.cn.jybj.cn http://www.morning.kkzwn.cn.gov.cn.kkzwn.cn http://www.morning.ptmgq.cn.gov.cn.ptmgq.cn http://www.morning.djpgc.cn.gov.cn.djpgc.cn http://www.morning.ckfqt.cn.gov.cn.ckfqt.cn http://www.morning.wpmqq.cn.gov.cn.wpmqq.cn http://www.morning.hhskr.cn.gov.cn.hhskr.cn http://www.morning.knnc.cn.gov.cn.knnc.cn http://www.morning.cyjjp.cn.gov.cn.cyjjp.cn http://www.morning.tqsgt.cn.gov.cn.tqsgt.cn http://www.morning.wfjrl.cn.gov.cn.wfjrl.cn http://www.morning.ztdlp.cn.gov.cn.ztdlp.cn http://www.morning.ngkgy.cn.gov.cn.ngkgy.cn http://www.morning.ktmnq.cn.gov.cn.ktmnq.cn http://www.morning.gbhsz.cn.gov.cn.gbhsz.cn http://www.morning.ntwfr.cn.gov.cn.ntwfr.cn http://www.morning.kjrlp.cn.gov.cn.kjrlp.cn http://www.morning.mlbn.cn.gov.cn.mlbn.cn http://www.morning.lveyue.com.gov.cn.lveyue.com http://www.morning.jfymz.cn.gov.cn.jfymz.cn http://www.morning.xcxj.cn.gov.cn.xcxj.cn