我有一个为 /session_auth_uri 配置了会话身份验证的控制器,如下所示:
@Controller
@RequestMapping("/session_auth_uri")
public class BaseController {
@RequestMapping(value = "/do", method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
@ResponseBody
public Result do(@RequestBody Query query) throws SomeException {
return new Result();
}
@RequestMapping(value = "/exec", method = RequestMethod.POST, consumes = "application/json", produces = "application/json")
@ResponseBody
public Result exec(@RequestBody Query query) throws SomeException {
return new Result();
}
}
我想扩展 BaseController 以重用 1 个处理程序方法 => do(...) (基本身份验证用于 /basic_auth_uri):
@Controller
@RequestMapping("/basic_auth_uri")
public class SubclassController extends BaseController {
}
问题是我希望在访问/basic_auth_uri/exec 时为 exec(...) 处理程序方法返回 HttpStatus.NOT_IMPLEMENTED。
感谢您的任何建议。