测试号配置服务器地址问题
直接上图
java后台代码
@RequestMapping(value="/callback",method={RequestMethod.GET,RequestMethod.POST} )
public String init(HttpServletRequest request, HttpServletResponse response) {
log.info("================================微信URL回调测试=========================");
SAXReader saxReader = new SAXReader();
Document document;
try {
try {
String nonce = request.getParameter("nonce");
String timestamp = request.getParameter("timestamp");
String signature = request.getParameter("signature");
//需要把微信参数返回去,要不然就会失败
String echoStr = request.getParameter("echostr");
log.info("FromUserName===" );
return echoStr;
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
return "";
}