package Ġcom . pr ame pri mo . shared . infrastructure Ċ Ċ import Ġcom . pr ame pri mo . shared . domain . bus . command . Command Ċ import Ġcom . pr ame pri mo . shared . domain . bus . command . Command Bus Ċ import Ġcom . pr ame pri mo . shared . domain . bus . query . Query Ċ import Ġcom . pr ame pri mo . shared . domain . bus . query . Query Bus Ċ import Ġcom . pr ame pri mo . shared . domain . bus . query . Response Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ Ċ abstract Ġclass ĠApi Controller Ġ{ ĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġprivate Ġval Ġquery Bus : ĠQuery Bus ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġprivate Ġval Ġcommand Bus : ĠCommand Bus ? Ġ= Ġnull ĊĊĠĠĠ Ġprotected Ġfun Ġask ( query : ĠQuery < Any ?> ): ĠResponse Ġ= Ġquery Bus !!. ask ( query ) ĊĠĠĠ Ġprotected Ġfun Ġdispatch ( command : ĠCommand < Any ?> ) Ġ= Ġcommand Bus !!. dispatch ( command ) Ċ }