Rev 32916 | Rev 32918 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.web.controller;import com.spice.profitmandi.web.util.MVCResponseSender;import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.web.bind.annotation.RequestBody;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RequestMethod;import javax.servlet.http.HttpServletRequest;import javax.transaction.Transactional;@Controller@Transactional(rollbackOn = Throwable.class)public class WebHookController {@AutowiredMVCResponseSender mvcResponseSender;private static final Logger LOGGER = LogManager.getLogger(WebHookController.class);@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.GET)public String click2callReportHandler(HttpServletRequest request, Model model, @RequestBody String report) throws Exception {LOGGER.info("Report - {}", report);model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));return "response";}@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST)public String click2callReportHandlerPost(HttpServletRequest request, Model model, @RequestBody String report) throws Exception {LOGGER.info("Report - {}", report);model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));return "response";}}