Parent Project
|
|---pom.xml
|
|---Module A
| |---pom.xml
|
|---Module B
|---pom.xml
- A 和 B 被声明为父模块。
父级被声明为 A 和 B 的
。 A 依赖于 B,在 A 的 pom.xml 中:
<dependency>
<groupId>abc.b</groupId>
<artifactId>b</artifactId>
<version>0.1</version>
</dependency>
我在 A 中使用 B 的接口(interface),但是 A 找不到该接口(interface): [错误]:找不到符号/包。
我是否因为依赖而错过了一些东西?
https://github.com/jianfeipan/ParisTraining/tree/master/server
父级:服务器
答:restapi
B:类服务
最佳答案
我应该添加包...我的类直接位于 java/下。
关于java - 无法使用另一个本地依赖模块中的接口(interface)或类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57866901/