gpt4 book ai didi

java - 无法使用另一个本地依赖模块中的接口(interface)或类

转载 作者:行者123 更新时间:2023-12-02 00:49:59 25 4
gpt4 key购买 nike

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com