在我的 SpringBoot 应用程序日志中,我看到以下警告:
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
从 Google 搜索来看,它们似乎与 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);
});
}
}
关于spring-boot - WebSocketDeploymentInfo,将使用默认的worker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60705285/