|
@ -7,6 +7,8 @@ import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONObject;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.MediaType;
|
|
@ -30,6 +32,7 @@ import java.util.Arrays;
|
|
|
@Api(description = "微信")
|
|
|
public class WechatCoreController extends WeixinBaseController {
|
|
|
|
|
|
private Logger logger= LoggerFactory.getLogger(WeixinBaseController.class);
|
|
|
@Autowired
|
|
|
private WeiXinCoreService weiXinCoreService;
|
|
|
@Value("${wechat.wechat_token}")
|
|
@ -103,6 +106,9 @@ public class WechatCoreController extends WeixinBaseController {
|
|
|
response.setHeader("Content-type", "text/html;charset=UTF-8");
|
|
|
//这句话的意思,是告诉servlet用UTF-8转码,而不是用默认的ISO8859
|
|
|
response.setCharacterEncoding("UTF-8");
|
|
|
|
|
|
logger.info(xmlStr);
|
|
|
|
|
|
response.getWriter().print(xmlStr);
|
|
|
}
|
|
|
} else {
|