Dubbo actual combat based on zookeeper
Stationed in 51CTO today, first send something to support the field, hope to see this article T friends add a concern, leave contact, thank you.
Many friends of Dubbo, which is very popular now, have heard of it. Recently, I have also been watching this and sharing my notes.
First of all, let's talk about the project framework that our team is going to do, and it's very simple to focus on implementing zookeeper-based dubbo registration.
Frame: springmvc+spring+zookeeper+dubbo
The project is divided into three layers, model stores data, view page display, controller under the specific logic implementation. Through the registration of the dubbo consumer and supplier, the supplier exposes the interface to the consumer for the consumer to call.
Configuration files for project deployment are as follows:
ApplicationContext-dubbo.xml
{--
--}
Dubbo.properties
{--
Dubbo.registry.address=zookeeper://127.0.0.1:2181
Dubbo.admin.root.password=root
Dubbo.admin.guest.password=guest
--}
Zoo_sample.cfg
{--
Under zookeeper/conf/, change zoo_sample.cfg to zoo.cfg, and start zkServer.cmd under bin/
--}
Because of the introduction of dubbo, the wdls exposure of the original Web Service project is abandoned. Because of the serious dependency of the project, the project is built with maven, introduces the jar package through Maven pom.xml three-dimensional coordinates, and calls dubbo exposure interface development.
/ * *
* @ author wonter
* description: learning a pattern update every day, please follow my blog!
* blog: http://javame.blog.51cto.com
* email: yiyu1@163.com
, /