@Override public void configureMessageBroker(MessageBrokerRegistry config) { /* 3-2.也就是頁面上用js來訂閱的地址,也是我們Server往Client端發送js端發送消息的地址, Client想要收到/topic與/queue所傳送來的訊息,必須subscribe。 /topic與/queue 可以自己定義名字。 詳細內容:http://goo.gl/ENNl3l */ config.enableSimpleBroker("/topic", "/queue"); // 5.這裡是我的解讀,所有要傳送到Server端的訊息,似乎都要經過這個前綴, config.setApplicationDestinationPrefixes("/receive"); }
@Override public void configureMessageBroker(MessageBrokerRegistry registry) { registry.setApplicationDestinationPrefixes("/app"); }
@Override public void configureMessageBroker(MessageBrokerRegistry config) { config.enableSimpleBroker("/topic"); config.setApplicationDestinationPrefixes("/app"); }
@Override public void configureMessageBroker(MessageBrokerRegistry config) { config.enableSimpleBroker("/topic"); }
@Override public void configureMessageBroker(MessageBrokerRegistry registry) { registry.enableSimpleBroker("/topic", "/queue"); registry.setApplicationDestinationPrefixes("/app", "/topic"); }