dubbo 服务接口的version有简单的方式统一配置吗?

Created on 15 Apr 2020  ·  3Comments  ·  Source: apache/dubbo

dubbo 服务接口的version有简单的方式统一配置吗?
@Service(version ="2.0")
不想要在每个服务接口的注解上都加对应的 version值, 能不能在某个地方指定一次version值,可以适用于所有接口

typquestion & discussion

Most helpful comment

可以通过<dubbo:provider/>配置缺省值

All 3 comments

可以通过<dubbo:provider/>配置缺省值

可以通过<dubbo:provider/>配置缺省值

dubbo.provider.version=2.0 添加缺省值后,在服务暴露过程中空指针异常了
ProviderModel model = ApplicationModel.getProviderModel(registeredProviderUrl.getServiceKey()); //null

@liangyuchun 2.7.5版本是存在这个问题 已经修复了 https://github.com/apache/dubbo/pull/5682

Was this page helpful?
0 / 5 - 0 ratings