Springboot+echarts实现可视化
现在在做毕设,做一个电商平台日志分析系统,需要结合可视化,达到一个直观的效果
1.搭建springboot项目,maven搭建,这是项目整体架构
2.后台代码:
@RestController
@RequestMapping("/wanglk_bds")
publicclassVisualController{
@Autowired
privateVisualInterfacevisualInterface;
/**
*每一天的访问用户量
*@return
*/
@RequestMapping(value="/bar-simple",method=RequestMethod.GET,produces="application/json")
@ResponseBody
publicListgetDateTotal(){
Listall=visualInterface.getAll();
returnall;
}
}
@Service
publicclassVisualInterfaceImplimplementsVisualInterface{
@Autowired
VisualMappervisualMapper;
@Override
publicListgetAll(){
Listtotals=visualMapper.selectAllFromTable();
returntotals;
}
}
@Mapper
publicinterfaceVisualMapper{
ListselectAllFromTable();
}
date,total select fromkeyword
3.前端代码: