Dubbo Use simple Instructions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.