<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ```java @MessageMapping("/v2/chat") public String chatInfo(String message) {...} ``` 如果方法只標注注解`@MessageMapping("/v2/chat")`,那么前端發送和訂閱的地址如下: ```js //客戶端向服務端發送數據 client.send('/app/v2/chat', {}, 'Hello World!') //客戶端訂閱服務端的數據 client.subscribe('/topic/v2/chat', (res) => {...}) ``` 如果想將訂閱的地址更改,則可以再標注一個`@SendTo`注解。 ```java @MessageMapping("/v2/chat") //注意:以 /topic 為前綴 @SendTo("/topic/new/send") public String chatInfo2(String message) { System.out.println("服務端收到消息:" + message); return "服務端:我已經收到消息!"; } ``` 則訂閱地址改為如下: ```js //向服務端發送數據 client.send('/app/v2/chat', {}, 'Hello World!') //訂閱服務端返回的數據 client.subscribe('/topic/new/send', (res) => { console.info(res.body) }) ``` >[warning]提醒:`/app`、`/topic`前綴我是已經在配置類中配置好了的。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看