dubbo solve local development Direct

problem:

In today's distributed development project, zookeeper + dubbo is the most common, usually using a zookeeper to do with the registry, dubbo do rpc, then the service can be deployed for remote communication between each other. So when developing the project, the development environment for as long as the connection address zk, and do not need to start all local services can call each other as if there are three services A, B and C, as long as B and C are connected to zk and deploy development environment ( B and C need to start or after the other in the local environment), configured corresponding to the service a zk information communication can be realized. But the development process, we sometimes do not want to access the service on the registry, but directly in the local FBI dubbo interfaces, for example, now I want to modify the service A and B locally, and then think of the FBI A service call service B results , but calls on C service or registry, then it requires some processing to bypass the registration centers visited B services.

solve:

Solution is relatively simple, the new user in the local computer file called a dubbo-resolve.properties, the path is $ {user.home} /dubbo-resolve.properties, then the configuration file that you need to direct service information, do not need to modify other configuration information for local projects,

# 直连本地的服务
com.xjt.order.facade.OrderFacade=dubbo://localhost:20890

Guess you like

Origin www.cnblogs.com/yeya/p/11829300.html