mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-11-04 09:01:40 +08:00 
			
		
		
		
	chore: 优化部分代码写法
This commit is contained in:
		@@ -16,7 +16,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
package top.continew.starter.messaging.websocket.autoconfigure;
 | 
					package top.continew.starter.messaging.websocket.autoconfigure;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cn.hutool.extra.spring.SpringUtil;
 | 
					 | 
				
			||||||
import jakarta.annotation.PostConstruct;
 | 
					import jakarta.annotation.PostConstruct;
 | 
				
			||||||
import org.slf4j.Logger;
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
@@ -65,15 +64,14 @@ public class WebSocketAutoConfiguration {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    @Bean
 | 
					    @Bean
 | 
				
			||||||
    @ConditionalOnMissingBean
 | 
					    @ConditionalOnMissingBean
 | 
				
			||||||
    public WebSocketHandler webSocketHandler() {
 | 
					    public WebSocketHandler webSocketHandler(WebSocketSessionDao webSocketSessionDao) {
 | 
				
			||||||
        return new top.continew.starter.messaging.websocket.core.WebSocketHandler(properties, SpringUtil
 | 
					        return new top.continew.starter.messaging.websocket.core.WebSocketHandler(properties, webSocketSessionDao);
 | 
				
			||||||
            .getBean(WebSocketSessionDao.class));
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Bean
 | 
					    @Bean
 | 
				
			||||||
    @ConditionalOnMissingBean
 | 
					    @ConditionalOnMissingBean
 | 
				
			||||||
    public HandshakeInterceptor handshakeInterceptor() {
 | 
					    public HandshakeInterceptor handshakeInterceptor(WebSocketClientService webSocketClientService) {
 | 
				
			||||||
        return new WebSocketInterceptor(properties, SpringUtil.getBean(WebSocketClientService.class));
 | 
					        return new WebSocketInterceptor(properties, webSocketClientService);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user