遇到的错误:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

这个问题一般都是拦截器或者controller注解有问题,我在调用zookeeper注册中心的@Reference注解导错了包,应该是org.apache.dubbo.config.annotation.Reference

springboot整合dubbo启动遇到空指针异常

还要注意:服务器端的@Service 注解应该是导入org.apache.dubbo.config.annotation.Service这个包,客户端的@Service 则是org.springframework.stereotype.Service这个包,导错了包就会空指针。

相关文章:

  • 2021-06-21
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案