1. 公眾平臺配置

  2. Controller

    復(fù)制代碼
    @Controller
    @RequestMapping("/wechat")
    publicclass WechatController {
        @Value("${DNBX_TOKEN}") private String DNBX_TOKEN; private static final Logger LOGGER = LoggerFactory.getLogger(WechatController.class);
        
        @Resource
        WechatService wechatService; /** * 微信接入
         * @param wc
         * @return * @throws IOException */ @RequestMapping(value="/connect",method = {RequestMethod.GET, RequestMethod.POST})
        @ResponseBody
        publicvoid connectWeixin(HttpServletRequest request, HttpServlet