spring webscket 中对象为null,无法注入

直接上解决方案:

不要使用注解,用

 ContextLoader
        .getCurrentWebApplicationContext().getBean("yourServiceName");

猜你喜欢

转载自blog.csdn.net/wang_3600/article/details/80310794
今日推荐