<!-- 开启dubbo注解支持 --> <!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 --> <dubbo:annotation package="com.bounter" />
import com.alibaba.dubbo.config.annotation.Service; @Servicepublic class DubboServiceImpl implements DubboService { }
<!-- 开启dubbo注解支持 --> <!-- 扫描注解包路径,多个包用逗号分隔,不填pacakge表示扫描当前ApplicationContext中所有的类 --> <dubbo:annotation package="com.bounter" />
<!-- 引入dubbo配置,解决dubbo注解不兼容问题 --> <import resource="classpath:spring-dubbo.xml"/>
@Referenceprivate DubboService dubboService;
The above is the detailed content of Detailed explanation of annotated Dubbo service configuration examples. For more information, please follow other related articles on the PHP Chinese website!