接上一篇,api模块很简单,就是对外提供接口,所以就不做介绍了,下面讲一下Sprintboot 中对dubbo的配置。
dubbo的配置在 core 模块,首先来看一下在项目中的位置:
左侧选中的三行就是dubbo主要的配置,resources下是 dubbo-provider.xml 和 dubbo-consumer.xml , 用于提供服务、引用服务,文件的内容如下:
dubbo-provider.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">
<dubbo:application name="msso-provider" owner="acs-provider" organization="Msso-Center" />
<dubbo:registry address