个人技术分享

【背景】

我们平时用Maven仓库都是引用外部别人写好的jar包,今天我需要自己在同一个Project下,在一个模块引用另一个模块中的类。案例展示如下:

【操作】

每个模块都有个自己的pom.xml文件,项目下也有个自己的pom.xml文件,每个pom文件中可以写<dependencies>...</dependencies>写依赖,依赖就是你引用的别人写好的类。

我需要在hbase_exercise模块的ConnectionUtil类下引用test111模块中Test111类中的as()方法

test111的pom.xml

hbase_exercise的pom.xml

引用: