List of usage examples for org.springframework.http HttpStatus OK
HttpStatus OK
To view the source code for org.springframework.http HttpStatus OK.
Click Source Link
From source file:com.baidu.stqa.signet.web.action.UserAction.java
/** * /*from w w w . ja va 2 s . c o m*/ * * @return */ @RequestMapping(value = "/user", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Map<String, String>> queryUser() { String user = getUser(); Map<String, String> result = new HashMap<String, String>(); result.put("user", user); return new ResponseEntity<Map<String, String>>(result, HttpStatus.OK); }
From source file:com.tribuo.backend.controllers.VentasController.java
/** * * @param id//from ww w . j a v a 2 s . c om * @return */ @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Ventas> getVenta(@PathVariable("id") Integer id) { Ventas u = se.getVentasById(id); return new ResponseEntity<>(u, HttpStatus.OK); }
From source file:demo.SecurityController.java
@RequestMapping("/authenticate") public ResponseEntity<Resource<?>> login(PersistentEntityResourceAssembler assembler) { User currentUser = new User(); currentUser.setId(1L);//from w ww .j a v a2 s . co m currentUser.setUsername("username"); return new ResponseEntity<Resource<?>>(assembler.toResource(currentUser), HttpStatus.OK); }
From source file:com.tribuo.backend.controllers.ComprasController.java
/** * * @param id/*from w w w .ja va 2s . co m*/ * @return */ @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Compras> getCompra(@PathVariable("id") Integer id) { Compras u = se.getComprasById(id); return new ResponseEntity<>(u, HttpStatus.OK); }
From source file:com.tribuo.backend.controllers.MarcasController.java
/** * * @param id/*from w ww.ja va 2 s . c om*/ * @return */ @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Marcas> getUsuario(@PathVariable("id") Integer id) { Marcas u = se.getMarcasById(id); return new ResponseEntity<>(u, HttpStatus.OK); }
From source file:io.syndesis.runtime.APIDocsITCase.java
@Test public void testSwaggerJson() { ResponseEntity<JsonNode> response = restTemplate().getForEntity("/api/v1/swagger.json", JsonNode.class); assertThat(response.getStatusCode()).as("swagger json response code").isEqualTo(HttpStatus.OK); assertThat(response.getBody().get("paths").size()).as("swagger json number of paths").isPositive(); }
From source file:com.tribuo.backend.controllers.TiendasController.java
/** * * @param id//from ww w. j ava2 s.c om * @return */ @RequestMapping(value = "/{id}", method = RequestMethod.GET) @ResponseBody public ResponseEntity<Tiendas> getTienda(@PathVariable("id") Integer id) { Tiendas u = se.getTiendasById(id); return new ResponseEntity<>(u, HttpStatus.OK); }
From source file:com.anuz.dummyclient.controller.api.ClientController.java
@RequestMapping(value = "/html_update/{clientId}", method = RequestMethod.GET) public ResponseEntity getHTMLUpdates(@PathVariable("clientId") int clientId) { System.out.println("Check"); String url = "http://192.168.0.112:8080/DummyAPI/api/v1/users/" + clientId + "/html/latest"; ModelMap map = new ModelMap(); map.addAttribute("updates", clientService.htmtUpdates(url)); return new ResponseEntity(map, HttpStatus.OK); }
From source file:monkeys.web.BananasController.java
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Banana>> getAllBananas() { List<Banana> monkeyList = (List<Banana>) bananaRepository.findAll(); HttpHeaders headers = new HttpHeaders(); return new ResponseEntity<>(monkeyList, headers, HttpStatus.OK); }
From source file:com.xinferin.controller.CustomerController.java
@RequestMapping(value = "/{customerId}", method = RequestMethod.DELETE) @ResponseStatus(HttpStatus.OK) public void deleteCustomer(@PathVariable int customerId) { daoCustomer.delete(customerId);//from w ww.j av a 2s. com }