spring springboot websocket 不能注入( @Autowired ) service bean 报 null 错误

原文:https://blog.csdn.net/m0_37202351/article/details/86255132java spring 或 springboot 的 websocket 里面使用 @Autowired 注入 service 或 bean 时,报空指针异常,service 为 null(并非不能被注入)。web 解决方法:将要注入的 service 改为 static,就不
相关文章
相关标签/搜索