dubbo
dubbo copied to clipboard
dubbo 注解方式暴露接口包扫描 不支持通配符??
<dubbo:annotation package="com.fominfo.*.provider" /> 如上配置无法扫描接口并注册服务到zk
@li362692680
<beans>
<context:component-scan base-package="org.example">
<context:include-filter type="regex"
expression=".*Stub.*Repository"/>
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Repository"/>
</context:component-scan>
</beans>
类似于这样吗?
@mercyblitz 是的,就是扫描的package不能写成通配符形式,如果要扫描多个包需要把多个包都列进去,比如需要扫描com.fominfo.a.consumer com.fominfo.b.consumer com.fominfo.c.consumer 三个包,需要把三个路径完整的写进去用逗号拼接起来,不能写成 com.fominfo.*.consumer 很麻烦
It has been resolved since Dubbo 2.6.