记得上下班打卡 | git大法好,push需谨慎

Commit 701f4b87 authored by jiangxiulong's avatar jiangxiulong

log

parent 10cbfc58
...@@ -3,6 +3,7 @@ package com.liquidnet.service.sweet.controller; ...@@ -3,6 +3,7 @@ package com.liquidnet.service.sweet.controller;
import com.liquidnet.service.sweet.utils.WechatSignUtils; import com.liquidnet.service.sweet.utils.WechatSignUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -11,6 +12,7 @@ import java.io.PrintWriter; ...@@ -11,6 +12,7 @@ import java.io.PrintWriter;
@Api(tags = "公众号动作回调") @Api(tags = "公众号动作回调")
@RestController @RestController
@RequestMapping("/actionCallback") @RequestMapping("/actionCallback")
@Slf4j
public class SweetActionCallbackController { public class SweetActionCallbackController {
@GetMapping("record") @GetMapping("record")
...@@ -24,20 +26,21 @@ public class SweetActionCallbackController { ...@@ -24,20 +26,21 @@ public class SweetActionCallbackController {
) { ) {
try { try {
if (WechatSignUtils.checkSignature(signature, timestamp, nonce)) { if (WechatSignUtils.checkSignature(signature, timestamp, nonce)) {
log.info('ssssssss');
PrintWriter out = response.getWriter(); PrintWriter out = response.getWriter();
out.print(echostr); out.print(echostr);
out.close(); out.close();
} else { } else {
System.out.println("这里存在非法请求!"); log.info("这里存在非法请求");
} }
} catch (Exception e) { } catch (Exception e) {
System.out.println(e.getMessage()); log.info(e.getMessage());
} }
} }
@PostMapping("record") @PostMapping("record")
@ApiOperation("post") @ApiOperation("post")
public void record() { public void record() {
System.out.println("这是post方法!"); log.info("111111");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment