
util
菜鸟柱子
编程小菜
展开
-
property 工具类
package com.zichen.xhkq.util;import java.io.FileNotFoundException;import java.io.IOException;import java.io.InputStream;import java.util.Properties;import org.slf4j.LoggerFactory;import org.s...原创 2018-11-29 17:27:57 · 230 阅读 · 0 评论 -
properties 配置获取util
// 4.请求地址获取 String requestFrontUrl = Properties.getString("server_url") + Properties.getString("bankGateWay"); package com.zichen.xhkq.util.xhPayUtil;import java.util.MissingResourceE...原创 2019-02-11 10:25:59 · 298 阅读 · 0 评论 -
String 2 map
/** * string parse 2 MapString * * @description 以&分割,key=value格式 * @author CNZZ * @time 2019-1-5 * @param str * @return */ public static Map<String, String> parseString2Ma...原创 2019-02-12 09:09:20 · 368 阅读 · 0 评论 -
获取前一天
/** * 获取前一天 * * @param date * @return */ public static Date getBeforeDay(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.DAY_O...原创 2019-02-12 10:42:20 · 142 阅读 · 0 评论 -
zip and unZip
/** * gZip解压方法 * * @param data * @return */ public static byte[] unGZip(byte[] data) { byte[] b = null; try { ByteArrayInputStream bis = new ByteArrayInputStream(data); GZIPInpu...原创 2019-02-12 10:51:23 · 191 阅读 · 0 评论 -
creatFolder
public static boolean createFolder(String folderPath) { boolean ret = true; try { File myFilePath = new File(folderPath); if ((!myFilePath.exists()) &&...原创 2019-02-13 14:41:43 · 510 阅读 · 0 评论 -
String 2 file
/** * String 2 file * * @param xml * @param fileName */ public static void writeStrToFile(String xml, String fileName) { try { FileOutputStream fos = new FileOutputStream(new File(fi...原创 2019-02-13 14:41:52 · 180 阅读 · 0 评论 -
邮件
/** * 邮件发送 * * @param mailText * @throws Exception */ public void sendMail(StringBuffer mailText) throws Exception { // 发件人的 邮箱 和 密码(替换为自己的邮箱和密码) // PS: 某些邮箱服务器为了增加邮箱本身密码的安全性,给 SMTP ...原创 2019-02-13 14:42:07 · 242 阅读 · 0 评论 -
解析跨域请求request+响应
package com.zichen.xhkq.controller.login;import java.io.IOException;import java.io.PrintWriter;import java.io.UnsupportedEncodingException;import javax.servlet.http.HttpServletRequest;import j...原创 2019-03-21 17:06:14 · 2490 阅读 · 0 评论