package Ġmicro kafka . esc q rs . orders . command Ċ Ċ import Ġmicro kafka . esc q rs . orders . command . model . Order Amount Update Command Ċ import Ġmicro kafka . esc q rs . orders . command . model . Order Create Command Ċ import Ġorg . springframework . http . Response Entity . ok Ċ import Ġorg . springframework . web . bind . annotation .* Ċ Ċ @ RestController Ċ @ RequestMapping ("/ orders ") Ċ class ĠOrder Controller ( ĊĠĠĠ Ġval Ġorder CommandHandler : ĠOrder CommandHandler Ċ ) Ġ{ ĊĠĠĠ Ġ@ PostMapping ĊĠĠĠ Ġfun Ġnew Order (@ RequestBody Ġcommand : ĠOrder Create Command ) Ġ= ĊĠĠĠĠĠĠĠ Ġok (). body ( order CommandHandler . handle Create ( command )) ĊĊĠĠĠ Ġ@ Put Mapping ĊĠĠĠ Ġfun Ġupdate Order (@ RequestBody Ġcommand : ĠOrder Amount Update Command ) Ġ= ĊĠĠĠĠĠĠĠ Ġok (). body ( order CommandHandler . handle Update ( command )) Ċ } Ċ