List of usage examples for org.springframework.http ResponseEntity status
Object status
To view the source code for org.springframework.http ResponseEntity status.
Click Source Link
From source file:com.training.rest.api.MyControllerAdvice.java
@ExceptionHandler(EntityNotFoundException.class) @ResponseStatus(value = HttpStatus.NOT_FOUND) public ResponseEntity<String> handleEntityNotFoundException(EntityNotFoundException ex) { return ResponseEntity.status(HttpStatus.NOT_FOUND).contentType(MediaType.TEXT_PLAIN).body("Nope, dude!"); }
From source file:io.restassured.module.mockmvc.http.RedirectController.java
@RequestMapping(value = "/redirect", method = GET, produces = APPLICATION_JSON_VALUE) public ResponseEntity<String> redirect() { return ResponseEntity.status(HttpStatus.MOVED_PERMANENTLY) .header("Location", "http://localhost:8080/redirect/1").body("{ \"id\" : 1 }"); }
From source file:am.ik.categolj3.api.entry.EntryFileDownloadController.java
@RequestMapping(path = "new") ResponseEntity<Resource> download() { return ResponseEntity.status(HttpStatus.OK).contentType(MediaType.parseMediaType("text/x-markdown")) .body(downloadFile);/*from ww w . j ava2 s. c om*/ }
From source file:com.sdl.odata.client.caller.MockController.java
@RequestMapping(value = "{code:\\d{3}}") ResponseEntity<?> respondWithCode(@PathVariable int code) throws IOException { return ResponseEntity.status(HttpStatus.valueOf(code)).body(String.valueOf(code)); }
From source file:com.github.lynxdb.server.api.http.handlers.EpConfig.java
@RequestMapping(path = "/", method = { RequestMethod.GET, RequestMethod.POST }, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity root() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }
From source file:com.github.lynxdb.server.api.http.handlers.EpUid.java
@RequestMapping(path = "/assign", method = { RequestMethod.GET, RequestMethod.POST }, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity assign() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }
From source file:com.github.lynxdb.server.api.http.handlers.EpAnnotation.java
@RequestMapping(path = "/", method = { RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE }, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity root() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }
From source file:com.github.lynxdb.server.api.http.handlers.EpTree.java
@RequestMapping(path = "/", method = { RequestMethod.GET, RequestMethod.POST, RequestMethod.DELETE, RequestMethod.PUT }, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity root() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }
From source file:com.mycompany.geocoordinate.controller.LineController.java
@ResponseStatus(HttpStatus.CREATED) @PostMapping(value = "/line", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ResponseEntity<List<Integer>> line(@RequestBody GeoObject geoObject) { boolean check = coordinateMapper.isThereGeoObjectFromLinetype(GeoType.GEOLINE) != null & coordinateMapper.selectCoordinateForLineorCircle(geoObject.getCoordinate()) != null; coordinateMapper.insertCoordinateForLine(GeoObject.getGEOLINE(), geoObject.getCoordinate()); List<Integer> responseType = coordinateMapper.selectIdGeo(geoObject.getCoordinate()); return ResponseEntity.status(HttpStatus.CREATED).body(responseType); }
From source file:com.github.lynxdb.server.api.http.handlers.EpStats.java
@RequestMapping(path = "/jvm", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity jvm() { return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).build(); }