简体   繁体   English

WebSocketDeploymentInfo,将使用默认worker

[英]WebSocketDeploymentInfo, the default worker will be used

In my SpringBoot application logs I see the following WARNs:在我的 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

From a Google search it seems they could be related to Undertow suggesting for an improvement which seems to be impossible to be implemented.从谷歌搜索看来,它们可能与 Undertow 有关,建议进行一项似乎不可能实施的改进。

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?有没有人对这些有任何进一步的澄清,也许是关于如何使日志消失的建议,因为应用程序运行得很好?

It is a heads up for configuration of buff pool and does not effect in using.它是buff池配置的提示,不影响使用。

As suggested from https://blog.csdn.net/weixin_39841589/article/details/90582354 ,正如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);
        });
    }
}

排除 undertow-websockets undertow-websockets-jsrio.undertow

If not using WebSocket in Undertow on SpringBoot.如果不在 SpringBoot 上的 Undertow 中使用 WebSocket。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 StandardPBEStringEncryptor 类使用的默认值是什么? - What are the default values used for StandardPBEStringEncryptor class? 如何查看用于连接数据库的默认配置 - how to look at default configuration used for connecting to DB Spring Boot 使用的默认 bean 范围是什么? - What is the default bean scope used by Spring Boot? Spring Boot默认不使用自定义密钥生成器 - Custom Key generator not being used by default in Spring Boot 什么是List <Object> 我们在SpringBoot中使用JPARepository时的默认大小? - What is List<Object> default size when we used JPARepository with SpringBoot? 如何更改 spring boot admin 使用的默认运行状况端点 - How to change the default health endpoint used by spring boot admin spring boot默认使用什么样的view技术 - What kind of view technology used in spring boot by default 覆盖 Kubernetes 中部署的 spring 引导应用程序使用的默认服务帐户 - Override Default Service account used by spring boot app deployed in Kubernetes 如何全局添加自定义Serializer到Jackson并默认使用 - How to globally add a custom Serializer to Jackson and be used by default Spring Boot应用程序需要在@Configuration类中为使用@Value定义默认bean? - Spring Boot application requires defining default beans in a @Configuration class for @Value to be used?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM