http://cron.qqe2.com/
2.校验正则表达式相等:
boolean boo = Pattern.compile("/pay/([0-9]+/){2,3}notify.htm").matcher("/pay/602/320/0/notify.htm").matches(); System.out.println(boo);
3.对象转map:
private static HashMap<String, String> toHashMap(Object object) { HashMap<String, String> data = new HashMap<String, String>(); // 将json字符串转换成jsonObject JSONObject jsonObject = JSONObject.fromObject(object); Iterator it = jsonObject.keys(); // 遍历jsonObject数据,添加到Map对象 while (it.hasNext()) { String key = String.valueOf(it.next()); String value = jsonObject.get(key).toString(); data.put(key, value); } return data; }