- 博客(5)
- 收藏
- 关注
原创 springmvc controller返回中文字符串
1.上代码@RequestMapping(value = "/string", produces={"text/html;charset=UTF-8"}, method = { RequestMethod.GET,RequestMethod.POST })@ResponseBodypublic String string(HttpServletRequest request, HttpServ...
2018-03-29 15:40:09
2003
原创 springmvc controller中返回已生成的json数据
1.上代码 @ResponseBody @RequestMapping(value = "/json", produces={"application/json; charset=UTF-8"}, method = { RequestMethod.GET, RequestMethod.POST }) public String json(HttpServletRequest reques...
2018-03-29 14:22:02
940
原创 springmvc controller中返回已经生成的xml数据
1.上代码import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.Requ...
2018-03-29 11:05:49
3678
转载 js中判断字符串是否为json
function isJson(){ if(typeof str == 'string'){ try{ var obj = JSON.parse(data); if(typeof obj == 'object' && obj){ return true; }else{ return false; }
2018-03-22 15:50:40
2881
原创 springmvc中使用qrgen(QRCode)生成二维码图片并显示在前台html img标签中
1.springmvc controller中使用QRCode生成二维码图片2.前台JSP页面中显示此图片
2018-03-22 15:02:56
3110
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人