Issue
In my SpringBoot application logs I see the following WARNs:
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
From a Google search it seems they could be related to Undertow suggesting for an improvement which seems to be impossible to be implemented.
Does anyone have any further clarifications on these, and maybe a suggestion on how to make the logs disappear since the application runs just fine?
Solution
It is a heads up for configuration of buff pool and does not effect in using.
As suggested from 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);
});
}
}
Answered By - Sean Sun
Answer Checked By - Robin (JavaFixing Admin)