自学highcharts饼图,springMVC框架,后台java,mysql数据库,官网下载Highcharts,留待以后备用
jsp页面代码:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><%=basePath%>"> 饼图
java代码:
控制器:
@ResponseBody @RequestMapping(value={"/pietest.do"}, method={RequestMethod.GET,RequestMethod.POST}) public void pietest(HttpServletRequest request,HttpServletResponse response) throws IOException{ System.out.println("111111111111111111111111111111"); response.setCharacterEncoding("utf-8"); PrintWriter out = response.getWriter(); List
接口实现:
public List
结果: