package web.controller; import db.form.DBAction; import db.model.TaskModel; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller @RequestMapping("/test") public class TestController extends BiliController{ @ResponseBody @RequestMapping(value = "task",produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public TaskModel test(){ TaskModel model=new TaskModel(); model.setId(1); model.setApi("www.baidu.com"); return model; } @Override public boolean checkAction(DBAction action) { return true; } }