首页>代码>spring boot整合eCharts,itext读取数据库数据显示eCharts柱状图表,支持pdf文件导出和生成图片>/spring-boot-echarts-master/src/main/java/com/demo/controller/IndexController.java
package com.demo.controller;

import com.demo.service.IndexService;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhouyulong
 * @date 2018/10/28 下午2:43.
 */
@Controller
@RequestMapping(value = "/")
public class IndexController {

    @Autowired
    private IndexService indexService;

    @RequestMapping(value = "index", method = RequestMethod.GET)
    public String index() {
        return "index";
    }


    @RequestMapping(value = "list", method = RequestMethod.GET)
    @ResponseBody
    public Map<String,Object> getList() {
        Map<String,Object> map = new HashMap<>();
        map.put("msg", "ok");
        map.put("data", indexService.findAll());
        return map;
    }
}
最近下载更多
wedfgr  LV1 2023年5月10日
周厉王  LV1 2023年2月24日
蓝卡布布  LV1 2022年11月28日
xiaoyuer2  LV8 2022年11月20日
litchi955  LV11 2022年10月11日
hbsoft2008  LV16 2022年8月22日
唯易人生  LV3 2022年8月15日
lironggang  LV38 2022年8月12日
cxdxfx12  LV14 2022年6月7日
wanggc  LV2 2022年5月7日
最近浏览更多
lyg422 2023年11月28日
暂无贡献等级
edpwyg  LV14 2023年10月22日
zhy1989wz  LV6 2023年10月21日
漫步的海星  LV4 2023年9月26日
jinshibo 2023年9月12日
暂无贡献等级
FuckYourMother 2023年8月12日
暂无贡献等级
zuidaimayou 2023年8月8日
暂无贡献等级
Yuhaha123  LV1 2023年6月26日
getset  LV8 2023年5月17日
wedfgr  LV1 2023年5月10日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友