BAEL-1746 added custom property editor implementation

This commit is contained in:
Erdem 2018-05-04 00:26:37 +03:00
parent 043f6bade7
commit 1fe62a811c
1 changed files with 5 additions and 3 deletions

View File

@ -16,13 +16,15 @@ import com.baeldung.propertyeditor.exotictype.model.ExoticType;
@RequestMapping(value = "/property-editor")
public class PropertyEditorRestController {
@GetMapping(value = "/credit-card/{card-no}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@GetMapping(value = "/credit-card/{card-no}",
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public CreditCard parseCreditCardNumber(@PathVariable("card-no") CreditCard creditCard) {
return creditCard;
}
@GetMapping(value = "/exotic-type/{value}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ExoticType parseCreditCardNumber(@PathVariable("value") ExoticType exoticType) {
@GetMapping(value = "/exotic-type/{value}",
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ExoticType parseExoticType(@PathVariable("value") ExoticType exoticType) {
return exoticType;
}