只需要在启动之前传入你需要用的channel类型就可以了。 ServerBootstrap初始化channelFactory过程: 最后我们再来看看这个channelFactory的使用场景: 相关文章: