|
自动生成的controller类里面会自动生成get、create、update等方法
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<?> get(@PathVariable("id") String id) {
TestEntity task = testService.get(TestEntity.class, id);
if (task == null) {
return new ResponseEntity(HttpStatus.NOT_FOUND);
}
return new ResponseEntity(task, HttpStatus.OK);
}
例如get方法,按照springMVC能够用controller/id的形式访问,但是在jeecg里面好像不好使,到底应该怎么使用?
|
|