package bot;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("/webhook")
public class BotController {

    @RequestMapping(method = RequestMethod.POST)
    public @ResponseBody WebhookResponse webhook(@RequestBody String obj){

        System.out.println(obj);


        return new WebhookResponse(obj, "https://www.google.com");
    }
}

@@ -503,44 +503,464 @@
 j)%7B%0A
-%0A        System.out.println(obj);%0A%0A%0A
+  System.out.println(obj);%0A        String indate = obj.substring(obj.indexOf(%22inDate%22),20);%0A        SimpleDateFormat f = new SimpleDateFormat(%22yyyyMMdd%22);%0A        Date date = new Date();%0A        String d = %2220170724%22;%0A        Date date1 = new Date();%0A        try %7B%0A            date = f.parse(indate);%0A           date1 = f.parse(d);%0A        %7D catch (ParseException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        %0A        if (date.after(date1))%0A    
     
@@ -990,19 +990,40 @@
 esponse(
-obj
+%22https://www.google.com%22
 , %22https
@@ -1039,20 +1039,86 @@
 ogle.com%22);%0A
+        else%0A            return new WebhookResponse(%22hey%22,%22hey%22);%0A
     %7D%0A%7D%0A

Update BotController.java