package Ġar . edu . ut n . fr ba . t acs . tp . api . her oc ard sg ame . config Ċ Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . messaging . simp . config . Message Broker Registry Ċ import Ġorg . springframework . web . socket . config . annotation . Enable WebSocket Message Broker Ċ import Ġorg . springframework . web . socket . config . annotation . Sto mp Endpoint Registry Ċ import Ġorg . springframework . web . socket . config . annotation . WebSocket Message Broker Configurer Ċ Ċ @ Configuration Ċ @ Enable WebSocket Message Broker Ċ class ĠWebSocket Config Ġ: ĠWebSocket Message Broker Configurer Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġconfigure Message Broker ( registry : ĠMessage Broker Registry ) Ġ{ ĊĠĠĠĠĠĠĠ Ġregistry . enable Simple Broker ("/ topic /") ĊĠĠĠĠĠĠĠ Ġregistry . set Application Destination Prefixes ("/ app ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġregister Sto mp Endpoints ( registry : ĠSto mp Endpoint Registry ) Ġ{ ĊĠĠĠĠĠĠĠ Ġregistry . add Endpoint ("/ user "). set Allowed Orig ins (" http :// localhost : 5 0 0 0 ") ĊĠĠĠ Ġ} Ċ Ċ }