@Controller @RequestMapping(value="/api/customer") public class CustomerRestController extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
private CustomerService |
customerService |
| コンストラクタと説明 |
|---|
CustomerRestController() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
org.springframework.http.ResponseEntity<Customer> |
findById(int customerId) |
String |
handleException(DataNotFoundException e) |
String |
register(Customer customer) |
@Autowired private CustomerService customerService
@RequestMapping(method=POST) @ResponseStatus(value=OK) @ResponseBody public String register(@RequestBody Customer customer)
@RequestMapping(value="/{customerId}",
method=GET)
public org.springframework.http.ResponseEntity<Customer> findById(@PathVariable
int customerId)
throws DataNotFoundException
@ExceptionHandler @ResponseStatus(value=NOT_FOUND) @ResponseBody public String handleException(DataNotFoundException e)