Provider方:需要用maven install將jar包放到中央倉庫
Provider的頭部信息:
<groupId>com.cn.test.un</groupId>
<artifactId>provider</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
Consumer方:在pom文件中添加provider的依賴(與上面陰影部分一致)
<dependency>
<groupId>com.cn.test.un</groupId>
<artifactId>provider</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>