My-Dubbo-demo1 #
1.The Demo uses multicast AS IT IS at The Registry Operating since the Simple and does not The require to Extra Installation
<Dubbo: Registry address = "multicast: //224.5.6.7: 1234" />
2.http: / this place is not the same /code.alibabatech.com/schema/dubbo and official website, because the use of different versions, to be determined in accordance with dubbo a jar of dubbo.xsd
Summarize steps:
1. three modules, api, provider, Consumer
2.provider, Consumer rely api, provider interfaces implemented in api
3.provider exposed Services:
1.Use multicast Registry Export Service Center to
1.Establish Dubbo Protocol to Export Service ON Port 20880
3.spring configuration bean: <bean id = "demoService " class = "com.dr.service.DemoServiceImpl" /> class implements the interface
4. the exposed service interface: the DECLARE BE-service interface exported to
<Dubbo: interface-service = "com.dr.api.DemoService" REF = "DemoService" />
4.service end of the application: Load spring configuration, context.start (), blocking program that has been running the service
application 5. consumer side:
1. Write spring configuration file:
use multicast Registry Service Center to the Discover,
registered to the zookeeper: <dubbo: registry address = "multicast : //224.5.6.7: 1234" />
generate proxy for the remote service
<dubbo:reference id="demoService" check="false" interface="com.dr.api.DemoService"/>
2. Load spring configuration file, start calling
gitHub address: https: //github.com/dengrongrong/my-dubbo-demo1