@sharable handler,so can't be added or removed multiple times
1.场景
netty集成springboot出现如上报错,像网上的事例,大部分都是没有继承springboot,例如下面代码
集成springboot的代码:
因是通过注入的方式,而不是通过new
解决方案:
增加@Sharable注解
@sharable handler,so can't be added or removed multiple times
netty集成springboot出现如上报错,像网上的事例,大部分都是没有继承springboot,例如下面代码
集成springboot的代码:
因是通过注入的方式,而不是通过new
解决方案:
增加@Sharable注解