报错:“is not a @Sharable handler ”"/>
netty多handler报错:“is not a @Sharable handler ”
1、项目要求多个Handler处理发送过来的各类消息,
我本地新建了多个Handler类,再采用Spring注入的方式注入到服务端,客户端中后,
报错:is not a @Sharable handler...................
参考:
两种解决方法,要么就是加上注解@Sharable,要么就是每次都new一个新的handler的实例。
更多推荐
netty多handler报错:“is not a @Sharable handler ”
发布评论