ezhizao_zx 3 months ago
parent
commit
f1237a7cb0

+ 1 - 1
src/main/java/cn/ezhizao/framework/config/SecurityConfig.java

@@ -109,7 +109,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
                 // 过滤请求
                 .authorizeRequests()
-                .antMatchers("/ws/**", "/wsExport/**").anonymous()
+                .antMatchers("/wsMessage/**", "/wsExport/**").anonymous()
                 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
                 .antMatchers("/login", "/register", "/da/getCurrentProductionByEquipCode", "/da/getCurrentProductionByEquipCodes", "/captchaImage","/sms/sendSms","/business/app/getUpdate","/snms/**","/mini/**").permitAll()
                 // 静态资源,可匿名访问

+ 1 - 1
src/main/java/cn/ezhizao/project/websocket/WebSocketUser.java

@@ -20,7 +20,7 @@ import java.util.concurrent.ConcurrentHashMap;
 
 //前端请求的路径
 
-@ServerEndpoint(value = "/ws/{userId}", encoders = {ServerEncoder.class})
+@ServerEndpoint(value = "/wsMessage/{userId}", encoders = {ServerEncoder.class})
 @Component
 public class WebSocketUser {
     private static final Logger log = LoggerFactory.getLogger(WebSocketUser.class);