springboot整合dubbozookeeper-实现生产者消费者模型

基于注解

https://github.com/Nirvana010…

基于xml文件

https://github.com/Nirvana010…

区别

基于xml文件方式,在服务提供方,新增provider.xml,在里面配置服务提供方相应的信息;在启动类中新增@ImportResource(“provider.xml”);去掉具体服务实现类中@Service注解;

在服务消费方,新增consumer.xml的配置文件;在启动类中新增@ImportResource(“consumer.xml”);
使用spring的@Autowired注解替代@Reference 。

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理