You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
webcrawler/web/src/test/java/web/controller/TestController.java

29 lines
780 B

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<TaskModel>{
@ResponseBody
@RequestMapping(value = "task",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public String test(){
TaskModel taskModel=new TaskModel();
taskModel.setId(1);
taskModel.setApi("www.baidu.com");
return taskModel.toString();
}
@Override
public boolean checkAction(DBAction action) {
return true;
}
}