I have one controller that is configured with session authentication for /session_auth_uri as below:
@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();
}
}
I want to extend BaseController to reuse 1 handler method => do(...) (basic authentication is used for /basic_auth_uri):
@Controller
@RequestMapping("/basic_auth_uri")
public class SubclassController extends BaseController {
}
The problem is that I want to be returned HttpStatus.NOT_IMPLEMENTED for exec(...) handler method when accessing /basic_auth_uri/exec.
Thanks for any suggestions.