mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 20:57:23 +08:00
chore: 优化部分代码
This commit is contained in:
@@ -46,7 +46,7 @@ import top.continew.starter.messaging.websocket.dao.WebSocketSessionDaoDefaultIm
|
||||
@AutoConfiguration
|
||||
@EnableWebSocket
|
||||
@EnableConfigurationProperties(WebSocketProperties.class)
|
||||
@ConditionalOnProperty(prefix = PropertiesConstants.MESSAGING_WEBSOCKET, name = PropertiesConstants.ENABLED, havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = PropertiesConstants.MESSAGING_WEBSOCKET, name = PropertiesConstants.ENABLED, matchIfMissing = true)
|
||||
public class WebSocketAutoConfiguration {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WebSocketAutoConfiguration.class);
|
||||
|
@@ -39,7 +39,7 @@ public class WebSocketProperties {
|
||||
/**
|
||||
* 是否启用 WebSocket
|
||||
*/
|
||||
private boolean enabled = false;
|
||||
private boolean enabled = true;
|
||||
|
||||
/**
|
||||
* 路径
|
||||
|
@@ -16,8 +16,6 @@
|
||||
|
||||
package top.continew.starter.messaging.websocket.core;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.server.ServerHttpRequest;
|
||||
import org.springframework.http.server.ServerHttpResponse;
|
||||
import org.springframework.http.server.ServletServerHttpRequest;
|
||||
@@ -37,7 +35,6 @@ import java.util.Map;
|
||||
*/
|
||||
public class WebSocketInterceptor extends HttpSessionHandshakeInterceptor {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WebSocketInterceptor.class);
|
||||
private final WebSocketProperties webSocketProperties;
|
||||
private final CurrentUserProvider currentUserProvider;
|
||||
|
||||
|
Reference in New Issue
Block a user