Tool class or connection

1. Scheduled task time configuration:
http://cron.qqe2.com/

2. Check that the regular expressions are equal:
boolean boo = Pattern.compile("/pay/([0-9]+/){2,3}notify.htm").matcher("/pay/602/320/0/notify.htm").matches();
System.out.println(boo);


3. Object to map:
private static HashMap<String, String> toHashMap(Object object) {

       HashMap<String, String> data = new HashMap<String, String>();  
       // Convert json string to jsonObject  
       JSONObject jsonObject = JSONObject.fromObject(object);  
       Iterator it = jsonObject.keys();  
       // Traverse the jsonObject data and add it to the Map object  
       while (it.hasNext())  
       {  
           String key = String.valueOf(it.next());  
           String value = jsonObject.get(key).toString();  
           data.put(key, value);  
       }  
       return data;  
}  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326529402&siteId=291194637