服务:

<?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. javascript编程思想

    javascript编程开发修炼之道   提要文摘附注: 本文的核心内容是围绕javascript前端开发的编程技术要素,来深入地探讨编写高质量的javascript代码的方法.技巧.规范和最佳实践, ...

  2. LintCode: Median of two Sorted Arrays

    求第k个值 1.归并排序 归并到第k个值为止 时间复杂度:O(k) class Solution { public: // merge-sort to find K-th value double h ...

  3. 庞果英雄会第二届在线编程大赛·线上初赛:AB数

    题目链接 给定两个正整数a,b,分别定义两个集合L和R, 集合L:即把1~a,1~b中整数乘积的集合定义为L = {x * y | x,y是整数且1 <= x <=a , 1 <= ...

  4. SQL到NoSQL概览性总结之一 数据库应用场景选型

    数据库类型与实例 适合场景 不适合场景 场景举例 关系数据库 基于集合理论,具有行和列的二维表,严格使用类型 开源MySQL/MariaDB, PostgreSQL 商业:Oracle,DB2,SQL ...

  5. openssl、x509、crt、cer、key、csr、ssl、tls process

    今天尝试在mac机上搭建docker registry私有仓库时,杯具的发现最新的registry出于安全考虑,强制使用ssl认证,于是又详细了解linux/mac上openssl的使用方法,接触了一 ...

  6. Linux下找不到动态链接库(转)

    1.生成静态库 生成静态库使用ar工具,其实ar是archive的意思 $ar cqs libhello.a hello.o 2.生成动态库 用gcc来完成,由于可能存在多个版本,因此通常指定版本号: ...

  7. 〖Android〗scp替换脚本

    有些手机没有scp命令行,考虑到我们在脚本中常常需要使用scp来复制文件,于是写个脚本代替scp: scp_from(){ local rfile=${##*:} local remote=${%%: ...

  8. 另一鲜为人知的单例写法-ThreadLocal

    另一鲜为人知的单例写法-ThreadLocal 源代码范例 当我阅读FocusFinder和Choreographer的时候,我发现这两类的单例实现和我们寻经常使用双重检查锁非常不一样.而是用来一个T ...

  9. linux下编译upx 3.93

    昨天,UPX发布了3.93版本. UPX(the Ultimate Packer for eXecutables)是一个非常全面的可执行文件压缩软件,支持dos/exe.dos/com.dos/sys ...

  10. Python yield 使用

    老是看到好的文章,不由自主的收集过来. 原文链接:https://www.ibm.com/developerworks/cn/opensource/os-cn-python-yield/ 廖大写的, ...