now very popular Dubbo many friends have heard of it, recently I also look at this aspect of things, to share my notes first.
It is very simple to implement zookeeper-based Dubbo registrations.
Frame: Springmvc+spring+zookeeper+dubbo
The project is divided into three layers, model storage data, view page display, controller under the specific logic implementation. By Dubbo Consumer and supplier registration, the supplier exposes the interface to the consumer for invocation by the consumer.
The project deployment needs configuration files are:
Applicationcontext-dubbo.xml
{--
<--Consumer app name, used to calculate dependencies, not match criteria, not as provider- -
<--using zookeeper registry to expose the service address--
<--generates a remote service proxy that can be used like a local bean demoservice-
<dubbo:reference id= "Demoservice" interface= "Com.unj.dubbotest.provider.DemoService"/>
--}
Dubbo.properties
{--
<--Zookeeper-based Dubbo registry directly deploys Tomcat, modifies web-inf files--
dubbo.registry.address=zookeeper://127.0.0.1:2181
Dubbo.admin.root.password=root
Dubbo.admin.guest.password=guest
--}
Zoo_sample.cfg
{--
zookeeper/conf/, modify Zoo_sample.cfg to Zoo.cfg, start bin/under Zkserver.cmd
--}
because of the introduction of Dubbo, the Wdls exposure of the original Web service project was discarded, the project was built using MAVEN through the Maven pom.xml three-dimensional coordinates, and the Dubbo exposed interface development was invoked due to the critical project Dependencies .
Dubbo Use simple Instructions