You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…ool under the Config mode. (#1133)
* Add notification logic after modifying web thread pool parameters.
* Refactor the notification module to enable notification capability for the web container.
* Add application profile enum.
* Revert the bugfix changes and split them into issue #1134.
* Revert @order annotation in AbstractWebThreadPoolService.
* fix profile enum name with test environment.
* Fix: remove unused imports.
* Delete ProfileEnum class.
* Modify the way of obtaining the ID of the web thread pool.
* Move the IExecutorProperties class to the common module.
* Narrow the scope of @SuppressWarnings annotation usage.
BUG 报告
你使用了哪个项目?
hippo4j config
你使用了哪个版本?
1.5.0-SNAPSHOT
预期行为
内存中Web Executor 成功更新至最新参数
实际行为
空指针
原因分析(如果可以)
cn.hippo4j.adapter.web.AbstractWebThreadPoolService
类实现了ApplicationRunner, 用于在启动后(run方法)从上下文当中获取嵌入式Web容器, 再获取其中的线程池. 但是由于没有指定优先级, 比cn.hippo4j.config.springboot.starter.refresher.AbstractConfigThreadPoolDynamicRefresh
执行的晚, 导致在启动时收到配置变更信息时,cn.hippo4j.adapter.web.AbstractWebThreadPoolService
当中的web容器线程池为空, 报空指针异常, 刷新失败.问题重现步骤
WebExecutorRefreshListener
当中调用cn.hippo4j.adapter.web.WebThreadPoolService#getWebThreadPoolParameter
方法会出现NPE异常解决方案
使用@order注解, 指定获取Web容器线程池的
AbstractWebThreadPoolService
为最先执行的ApplicationRunnerThe text was updated successfully, but these errors were encountered: