Getting started five Dubbo

5. Dubbo annotated edition

Prior to providers and consumers in dubbo profile explicitly written content, the official also provides an annotated way, the next renovation project

1, the service provider

dubbo profile

Manual commented previously stated, add <dubbo: annotation /> tag

 

 

 Add @Service dubbo tag provided in the above implementation class

 

 

 

2, the service consumer

Dubbo profile

The remote agent stated before the comment, add the <dubbo: annotation /> tag

 

 

 Add in the controller dubbo provides a common interface reference @Reference

 

 

The following operating results

 

Guess you like

Origin www.cnblogs.com/lovetq520/p/11690221.html