这是ChannelHandler里的代码 public interface ChannelHandler { void handlerAdded(ChannelHandlerContext var1) throws Exception; void handlerRemoved(ChannelHandlerContext var1) throws Exception; /** @deprecated */ @Deprecated void exceptionCaught(ChannelHandlerContext var1, Throwable var2) throws Exception; @Inherited @Documented @Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Sharable { } } @Sharable是属于接口ChannelHandler的,你应该使用@ChannelHandler.Sharable
这是ChannelHandler里的代码
@Sharable是属于接口
ChannelHandler
的,你应该使用@ChannelHandler.Sharable