目录
一、spring+dubbo案例整合
项目github地址:https://github.com/liushangzaibeijing/dubbodemo.git
1、项目结构如下
该项目是一个父子依赖的多模块maven项目
- dubboolddemo(root) 父项目: 主要用于设置子项目通用maven依赖(统一控制通用依赖的版本信息,紫烈不需要声明)
- dubbo-api (child) 子项目: 主要是通用项目依赖(比如接口,实体,枚举,常量)
- dubbo-core (child) 子项目:dubbo接口的服务提供方(服务提供者)
- dubbo-oms (child) 子项目:dubbo接口的服务调用放(服务消费者)
2、dubbo服务/消费配置
- dubbo服务提供者配置
<?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/sch