服务:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd" default-autowire="byName"> <dubbo:provider group="xxx"/>

<!-- 提供方应用信息,用于计算依赖关系 -->
<dubbo:application name="sports-basic-provider"/>

<!-- 使用zookeeper注册中心暴露服务地址 -->
<dubbo:registry protocol="zookeeper" address="${dubbo.registry.address}"/>

<!-- 使用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20880"/>

    <!-- basic start -->
<dubbo:service interface="com.xxx.basic.manage.service.OrganizationService" ref="organizationService" timeout="10000"/>
<dubbo:service interface="com.xxx.basic.manage.service.ResourceService" ref="resourceService" timeout="10000"/>
<dubbo:service interface="com.xxx.basic.manage.service.SysRoleService" ref="sysRoleService" timeout="10000"/>
<dubbo:service interface="com.xxx.basic.manage.service.SysUserService" ref="sysUserService" timeout="10000"/> </beans>

增加三行黑色的

消费端:

consumer.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://code.alibabatech.com/schema/dubbo
http://code.alibabatech.com/schema/dubbo/dubbo.xsd" default-autowire="byName"> <dubbo:application name="${dubbo.application.name}"/>
<dubbo:registry address="${dubbo.registry.address}" timeout="${dubbo.consumer.timeout}" />
<dubbo:consumer retries="${dubbo.consumer.retries}" group="oa" /> <!-- basic start -->
<dubbo:reference interface="com.xxx.basic.manage.service.SysRoleService" id="sysRoleService" check="false" url="dubbo://localhost:20880"/>
<dubbo:reference interface="com.xxx.basic.manage.service.ResourceService" id="resourceService" check="false" url="dubbo://localhost:20880" />
<dubbo:reference interface="com.xxx.basic.manage.service.OrganizationService" id="organizationService" check="false" url="dubbo://localhost:20880" />
<dubbo:reference interface="com.xxx.basic.manage.service.SysUserService" id="sysUserService" check="false" url="dubbo://localhost:20880"/> </beans>

增加url="dubbo://localhost:20880"即可。

dubbo本地调试直连的更多相关文章

  1. Dubbo本地调试

    dubbo 启动标志 Dubbo service server started <dubbo:reference id="transferTimingUploadHisRPCServi ...

  2. Dubbo入门到精通学习笔记(十二):Dubbo消费端直连提供者(开发调试)、Dubbo服务只订阅(开发调试)、Dubbo服务只注册

    文章目录 Dubbo消费端直连提供者(开发调试) Dubbo服务只订阅(开发调试) Dubbo服务只注册 Dubbo消费端直连提供者(开发调试) Dubbo 官方文档: 用户指南 >> 示 ...

  3. dubbo本地服务化实现(dubbo三)

    一.dubbo服务化架构包含的内容 对于传统工程而言,分层的依据是按照包来区分.由于在相同的工程中,所以服务的提供和调用可以方便的实现. 但是对于分布式架构而言,服务的提供者负责服务具体的实现和接口规 ...

  4. Hive 本地调试方法

    关键词:hive, debug 本地调试(local debug) Hive 可分为 exec (hive-exec,主要对应源码里的ql目录) 和 metastore 两部分,其中exec对外有两种 ...

  5. 【2020-03-21】Dubbo本地环境搭建-实现服务注册和消费

    前言 本周主题:加班工作.本周内忙于CRUD不能自拔,基本每天都是九点半下班,下周上线,明天还要加班推进进度.今天是休息日,于是重拾起了dubbo,打算近期深入了解一下其使用和原理.之所以说是重拾,是 ...

  6. 【原创】K8S环境下研发如何本地调试?kt-connect使用详解

    K8S环境下研发如何本地调试?kt-connect使用详解 背景 注:背景有点啰嗦,讲讲一路走来研发本地调试的变化,嫌烦的可以直接跳过,不影响阅读. 2019年 我在的公司当时是个什么情况,只有两个J ...

  7. mapreduce 本地调试需要注意的问题

    1.写好的程序直接在hadoop集群里面执行 2.如果需要在本地调试,需要注释掉mapred-site.xml <configuration> <!-- <property&g ...

  8. 开源分布式实时计算引擎 Iveely Computing 之 本地调试Topology(4)

    当我们写完一个比较复杂的Topology之后,倘若直接提交到服务器上运行,难免会有很多问题,如何进行本地的调试Topology,是我们非常关心的问题.我们依然以WordCount作为代码示例. 首先, ...

  9. dubbo远程调试运行

    缺包问题: maven配置或则下载 http://central.maven.org/maven2/org/mortbay/jetty/jetty/7.0.0.pre5/jetty-7.0.0.pre ...

随机推荐

  1. 使用Feign时报错Service id not legal hostname

    报错Service id not legal hostname的原因是服务名称不能带有下划线,可以使用中划线

  2. 解决Android Studio提示gradle project sync failed报错的解决方法

    运行的时候报错,提示:gradle project sync failed 1.打开AS,切换到project目录结构依次进入目录app->gradle->gradle-wrapper.p ...

  3. C/C++中的值传递,引用传递,指针传递,指针引用传递

    在面试过程中,被面试官问到传值和传引用的区别,之前没有关注过这个问题,今天在网上找了一篇包含代码和图片的讲解文章,浅显易懂,遂转载备忘. 1. 值传递 void f( int p){ printf(& ...

  4. IDEA 之 “There is no configured/running web-servers found!...”

    首次配置 IDEA 2017.1.1 与 Tomcat9.0 的 java 开发环境. 在配置成功并创建第一个 Web Application(3.1) 项目后,运行或调试正常运行. 直接在 jsp ...

  5. Word 之 清除页眉下划线

    在应用 Word 的时候,有时我们需要为文件添加页眉,但是首页却不需要.这时一般都会勾选“ 首页不同 ”并关闭页眉页脚.一种情况页眉不显示任何信息及下划线,另一种情况页眉留有下划线.以下针对第二种情况 ...

  6. vcenter SSO

  7. Qt通过ODBC连接SQL Server2008实践总结

    Qt连接数据库的方式很多,这里说明一种最常用也是最实用的方式,因为这种方式在Windows上开发程序使用起来非常方便,并且也是远程连接数据库所需要用到的方式. 前提工作: 在Win7下安装了SQL S ...

  8. java笔记整理

    Java 笔记整理 包含内容     Unix Java 基础, 数据库(Oracle jdbc Hibernate pl/sql), web, JSP, Struts, Ajax Spring, E ...

  9. python 获取当前执行的命令 处于什么文件内

    https://stackoverflow.com/questions/3718657/how-to-properly-determine-current-script-directory-in-py ...

  10. bootstrap设计站点中加入代码高亮插件

    这款插件的名字叫做google-code-prettify 使用该插件之前的效果: 使用插件之后的效果: 接下来说步骤: (1)下载两个文件 http://codecloud.sinaapp.com/ ...