• websocket中无法注入mapper文件
  • 其它
    2.00元

springboot+websocket:

@Autowired无法注入mapper,改为static也不行,

参照网上:

private UserMapper userMapper = (UserMapper) ContextLoader.getCurrentWebApplicationContext().getBean("UserMapper");

在线求大佬

  • 就几件    2020-06-28 10:34:08
  • 阅读 1132    收藏 0    回答 1
  • 邀请
  • 收藏
  • 分享
发送
登录 后发表评论
  • 51testing软件测试圈微信