这种方法有利有弊 酌情使用
public class BaseCustApiController<S extends IService<T>, T> extends BaseParentCustApiController {
protected Log log = LogFactory.getLog(this.getClass());
@Autowired
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
private S baseService;
public S getBaseService() {
return this.baseService;
}
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "int", name = "pageNo", value = "页码", defaultValue = "1"),
@ApiImplicitParam(paramType = "query", dataType = "int", name = "pageSize", value = "每页条目数", defaultValue = "10")
})
@ApiOperation(value = "查询列表")
@GetMapping("/page")
public Result<?> getListInfo(@RequestParam(defaultValue = "1", required = false) Integer pageNo,
@RequestParam(defaultValue = "10", required = false) Integer pageSize,