BAEL-1746 added custom property editor implementation
This commit is contained in:
parent
043f6bade7
commit
1fe62a811c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue