apache / dubbo-spring-boot-project

Spring Boot Project for Apache Dubbo
https://dubbo.apache.org
Apache License 2.0
5.41k stars 1.88k forks source link

dubbo-spring-boot-actuator原因启动报错问题 #33

Closed Comven closed 6 years ago

Comven commented 6 years ago

现在引用dubbo-spring-boot-starter默认就会引入dubbo-spring-boot-actuator,但是如果应用程序未使用spring-boot-starter-actuator,那么程序启动会不成功,因为dubboEndpoint的暴露依赖了spring-boot-starter-actuator,这种情况是否应该在DubboEndpointAutoConfiguration中增加@Conditional条件保证在最少依赖的条件下都可以正常启动dubbo程序。否则每个程序都必须引入spring-boot-starter-actuator,这样的话直接跟dubbo-spring-boot-starter直接引入spring-boot-starter-actuator有什么区别。在issue#26中既然应该由应用程序来决定是否引入,那么dubbo-spring-boot-starter就应该支持不引入该组件的情况才对吧。

chenyf3 commented 6 years ago

我也出现了这个问题,这个问题除了需要引入spring-boot-starter-actuator,还需要强制引入spring-boot-starter-web,也是不合理的

mercyblitz commented 6 years ago

@yufeng629 spring-boot-starter-actuator's dependency has been changed to be optional . However , spring-boot-starter-web always is optional . If application did not include spring-boot-starter-web, the dubbo-spring-boot-actuator could be used on JMX if available, thus spring-boot-starter-web is not a mandatory dependency.

chenyf3 commented 6 years ago

i see, thanks!