public abstract class BaseController<E extends BaseEntity> {
@GetMapping("/find")
public ServerResponse find() {
return ServerResponse.success();
}
}
@RestController
@RequestMapping("/api/department")
public class DepartmentController extends BaseController<Department> {
@RequestMapping("/find2")
@ResponseBody
public ServerResponse find2() {
return ServerResponse.success();
}
}
localhost:Temp nicq$ http GET :8010/api/department/find
HTTP/1.1 200
Content-Length: 0
Date: Sat, 12 Oct 2019 12:12:13 GMT
localhost:Temp nicq$ http GET :8010/api/department/find2
HTTP/1.1 200
Content-Length: 0
Date: Sat, 12 Oct 2019 12:12:17 GMT
我期望响应正文中有一些json字符串,但它为空。
当我打开调试模式时,不执行基本查找方法。
我正在实现通用控制器。 :<< / p>