开发ws链接

This commit is contained in:
huangdeliang
2021-06-02 14:06:21 +08:00
parent d7368a2e0e
commit cfe970bd45
8 changed files with 286 additions and 6 deletions

View File

@ -59,6 +59,23 @@
<artifactId>stdiet-system</artifactId>
</dependency>
<!-- websocket-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -102,6 +102,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/custom/wxUserInfo/wx/**",
"/custom/wxUserLog/wx/**",
"/wx/**",
// "/ws/**",
"/wap/**",
"/investigate/**",
"/common/customerUploadFile",

View File

@ -0,0 +1,18 @@
package com.stdiet.framework.config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
@Configuration
@ConditionalOnWebApplication
public class WebsocketConfig {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}