apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.4k stars 26.41k forks source link

export服务,applicationEventPublisher为null #4314

Closed niejian closed 5 years ago

niejian commented 5 years ago

Environment

Steps to reproduce this issue

在spring boot 1.5.3的环境中,使用注解@Service方式注册相关的服务,在启动项目的时候爆出 Initialization of bean failed; nested exception is java.lang.NullPointerException 错误。经过调试发现dubbo在export服务的发布通知的时候时候, applicationEventPublisher 是空,请问如何解决

web1992 commented 5 years ago

检查一下自己的 spring-boot 的配置吧。我自己搭建的spring boot + Dubbo 没有问题

dubbo-spring-boot

我用的是 Spring boot starter. Spring boot 版本改成 1.5.3.RELEASE 也没错误

niejian commented 5 years ago

是spring版本的问题。spring版本改变为5+之后就可以了。springboot1.5.3使用的spring4.3.8的版本