List of usage examples for org.springframework.http ResponseEntity ok
public static <T> ResponseEntity<T> ok(T body)
From source file:pitayaa.nail.msg.core.packageDtl.controller.PackageDtlController.java
@RequestMapping(value = "packageDtl/model", method = RequestMethod.GET) public @ResponseBody ResponseEntity<?> initAccountModel() throws Exception { PackageDtl packageDtlEntity = (PackageDtl) coreHelper.createModelStructure(new PackageDtl()); return ResponseEntity.ok(packageDtlEntity); }
From source file:com.anuz.dummyapi.controller.DefaultController.java
@RequestMapping(value = "hello", method = RequestMethod.GET) public ResponseEntity index() { return ResponseEntity.ok("hello!, I'm feeling great"); }
From source file:pitayaa.nail.msg.core.license.controller.LicenseController.java
@RequestMapping(value = "licenses/model", method = RequestMethod.GET) public @ResponseBody ResponseEntity<?> initAccountModel() throws Exception { License account = (License) coreHelper.createModelStructure(new License()); return ResponseEntity.ok(account); }
From source file:com.ventura24.lv.CustomerController.java
@RequestMapping(method = RequestMethod.GET) public ResponseEntity<?> findAllCustomers() { return ResponseEntity.ok(new Customer(BigDecimal.TEN, 1L, "name")); }
From source file:pitayaa.nail.msg.core.account.controller.AccountLicenseController.java
@RequestMapping(value = "/accountsLicense/model", method = RequestMethod.GET) public @ResponseBody ResponseEntity<?> initAccountLicenseModel() throws Exception { AccountLicense jsonAccountLogin = (AccountLicense) coreHelper.createModelStructure(new AccountLicense()); return ResponseEntity.ok(jsonAccountLogin); }
From source file:com.greglturnquist.ConditionalController.java
@RequestMapping(value = "/employees") ResponseEntity<?> employees() { return ResponseEntity.ok(repository.findAll()); }
From source file:br.com.stefanini.database.service.UserService.java
@RequestMapping("/user/find") public ResponseEntity<User> getByLoginAndPassword(@RequestParam(name = "login", required = true) String login, @RequestParam(name = "password", required = true) String password) { User found = dao.findOneByLoginAndPassword(login, password); if (found == null) return ResponseEntity.notFound().build(); return ResponseEntity.ok(found); }
From source file:com.example.web.CustomerRestController.java
@RequestMapping(value = "/{id}", method = GET) public ResponseEntity<?> get(@PathVariable Long id) { Customer customer = customerRepository.findOne(id); if (customer != null) { return ResponseEntity.ok(customer); }// ww w. ja va 2 s . c o m return ResponseEntity.notFound().build(); }
From source file:com.greglturnquist.ConditionalController.java
@RequestMapping(value = "/employees/{id}") ResponseEntity<?> employee(String id) { return ResponseEntity.ok(repository.findOne(id)); }
From source file:com.orange.clara.pivotaltrackermirror.controllers.ConverterTypeController.java
@ApiOperation(value = "Get the list of all available converter in the app", response = ConverterTypeResponse.class, responseContainer = "List") @RequestMapping(method = RequestMethod.GET, value = "", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<?> getAll() { List<ConverterTypeResponse> converterTypeResponses = Lists.newArrayList(); for (ConverterType converterType : ConverterType.values()) { converterTypeResponses.add(new ConverterTypeResponse(converterType)); }/*from w ww .ja va 2 s . c o m*/ return ResponseEntity.ok(converterTypeResponses); }