wangzihaogithub / spring-boot-protocol

springboot功能扩充-netty动态协议,可以支持各种网络协议的动态切换(单端口支持多个网络协议).支持mmap,sendfile零拷贝,http请求批量聚合
https://zihaoapi.cn
Apache License 2.0
117 stars 63 forks source link

导入了过期的包 #7

Closed weijie0 closed 3 years ago

weijie0 commented 3 years ago

https://github.com/wangzihaogithub/spring-boot-protocol/blob/master/src/main/java/com/github/netty/core/AbstractNettyServer.java#L4

包import io.netty.bootstrap.ChannelFactory; 已经过期 正确的应该是 import io.netty.channel.ChannelFactory;

wangzihaogithub commented 3 years ago

这个是为了同时兼容 netty3,netty4 ,netty5, 你看到其他用反射调用的代码, 也是为了兼容。

因为当用户导入包的时候, 会以用户导入的包为准。

wangzihaogithub commented 3 years ago

很细心呀 棒! spring自动配置那块也是, 为了同时兼容,springboot2.0, 2.1, 2.2

weijie0 commented 3 years ago

阿西吧,666