List of usage examples for org.springframework.http ResponseEntity ok
public static <T> ResponseEntity<T> ok(T body)
From source file:org.n52.restfulwpsproxy.webapp.rest.CapabilitiesController.java
/** * * @return/*from ww w . j a v a 2 s .c o m*/ */ @RequestMapping(method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public ResponseEntity<CapabilitiesDocument> getCapabilities() { return ResponseEntity.ok(client.get()); }
From source file:org.zalando.logbook.servlet.example.ExampleController.java
@RequestMapping("/async") public Callable<ResponseEntity<Message>> returnMessage() { return () -> { final Message message = new Message(); message.setValue("Hello, world!"); return ResponseEntity.ok(message); };/*from w ww . ja va2s. c o m*/ }
From source file:jp.classmethod.example.berserker.web.RootController.java
@RequestMapping(value = "/public", method = RequestMethod.GET) public ResponseEntity<?> publicResource() { return ResponseEntity.ok("public"); }
From source file:com.github.lynxdb.server.api.http.handlers.EpAggregators.java
@RequestMapping(path = "", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity root() { return ResponseEntity.ok(allAggregators.get().keySet()); }
From source file:com.yoncabt.ebr.ws.ReportWS.java
@RequestMapping(value = { "/ws/1.0/reportList" }, method = RequestMethod.GET, produces = "application/json") public ResponseEntity<List<ReportDefinition>> reportList() throws IOException, JRException { return ResponseEntity.ok(reportService.reportList()); }
From source file:org.n52.restfulwpsproxy.webapp.rest.CapabilitiesController.java
@RequestMapping(value = "/processes", method = RequestMethod.GET) public ResponseEntity<Contents> processSummaries() { return ResponseEntity.ok(client.get().getCapabilities().getContents()); }
From source file:com.orange.clara.pivotaltrackermirror.controllers.TaskStatusController.java
@ApiOperation(value = "Get information of a task which is link to a specific mirror", response = TriggerResponse.class) @RequestMapping(method = RequestMethod.GET, value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<?> get(@PathVariable Integer id) throws SchedulerException { Trigger trigger = this.getTriggerFromId(id); return ResponseEntity.ok(new TriggerResponse(trigger, this.getTriggerState(id), id)); }
From source file:jp.classmethod.example.berserker.web.RootController.java
@RequestMapping(value = "/admin", method = RequestMethod.GET) public ResponseEntity<?> adminResource() { return ResponseEntity.ok("admin"); }
From source file:tds.assessment.web.endpoints.SegmentController.java
@GetMapping(value = "/segment-items/{key}", produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody//from www . jav a2 s .com public ResponseEntity<SegmentItemInformation> getSegmentInformation(@PathVariable String key) { SegmentItemInformation segmentItemInformation = segmentService.findSegmentItemInformation(key) .orElseThrow(() -> new NotFoundException("Failed to find segment for %s", key)); return ResponseEntity.ok(segmentItemInformation); }
From source file:springfox.documentation.spring.web.dummy.controllers.BugsController.java
@RequestMapping(value = "1306", method = RequestMethod.POST) public ResponseEntity<Map<String, String>> bug1306(@RequestParam Map<String, String> paramMap) { return ResponseEntity.ok(null); }