WebSocketConfig.java 489 B

12345678910111213141516171819
  1. package com.ruoyi.equity.config;
  2. import org.springframework.context.annotation.Bean;
  3. import org.springframework.context.annotation.Configuration;
  4. import org.springframework.web.socket.config.annotation.EnableWebSocket;
  5. import org.springframework.web.socket.server.standard.ServerEndpointExporter;
  6. @Configuration
  7. @EnableWebSocket
  8. public class WebSocketConfig {
  9. @Bean
  10. public ServerEndpointExporter serverEndpointExporter() {
  11. return new ServerEndpointExporter();
  12. }
  13. }