对股票数据进行预处理:
@RestController@RequestMapping("/SharesController")public class SharesController { @RequestMapping("/getData") public String getData() { String result1= HttpUtil.get("http://hq.sinajs.cn/list=sh601006"); System.out.println("截取前 :"); System.out.println(result1); String[] strings = StrUtil.splitToArray(result1, ','); String hzy = ""; int i = 0; for (String string : strings) { hzy += "[" + i + "]" + string + "\n"; i++; } return hzy; }}
待加: