WebSocketDeploymentInfo,将使用默认的工作者



在我的SpringBoot应用程序日志中,我看到以下WARN:

UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used
UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used

从谷歌搜索来看,它们似乎与Undertow建议的改进有关,而这似乎是不可能实现的。

有人对此有任何进一步的澄清吗?也许还有关于如何让日志消失的建议,因为应用程序运行得很好?

这是对buff池配置的提示,在使用中不起作用。

根据建议https://blog.csdn.net/weixin_39841589/article/details/90582354,

@Component
public class CustomizationBean implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {

@Override
public void customize(UndertowServletWebServerFactory factory) {
factory.addDeploymentInfoCustomizers(deploymentInfo -> {
WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 1024));
deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
});
}
}

如果没有在SpringBoot的Undertow中使用WebSocket。

implementation ("org.springframework.boot:spring-boot-starter-undertow") {
exclude group: "io.undertow", module: "undertow-websockets-jsr"
}

当前websockets 下的排除

<exclusion><artifactId>undertow-websockets-jsr</artifactId><groupId>io.undertow</groupId></exclusion>

相关内容

  • 没有找到相关文章

最新更新