Ofcourse, you can use raw servlet api HttpServletResponse, @RequestMapping("test") public void test(HttpServletResponse response) throws IOException { response.setStatus(10000); // http status code 10000(NOT EXISTS) response.flushBuffer(); } But is's not recommend to use a HTTP status code that does not exists,cause the clients don't know what it means
Ofcourse, you can use raw servlet api HttpServletResponse,
But is's not recommend to use a HTTP status code that does not exists,
cause the clients don't know what it means