用于调试器 java 的 Intellij java 构建工件:包不存在
尝试为 Spring 应用程序设置调试器。根据此评论 什么在 Spring Boot 应用程序中创建目标目录?< /a> 我可能需要文物。 我不知道如何为 Spring Boot 应用程序设置工件,因此尝试通过 cmd 应用程序文章 https://www.jetbrains.com/help/idea/debug-a-java-application-using-a-dockerfile.html
我没有设置Main类,因为我不知道我的项目中的主类是什么。我尝试搜索函数 main() 但没有找到。所以我设置了:
运行构建>构建工件并选择我的 jar 工件,我得到
/home/agmis/projects/openelis/src/main/java/org/openelisglobal/dataexchange/fhir/FhirUtil.java:4:46 java: package org.itech.fhir.dataexport.core.service 不存在
我认为这部分代码工作的可能性很大,因为我一直在调试相关代码,看到了该功能。所以我在构建工件时可能会遇到这个错误。而且该功能是在今年4月5日修改的,所以这也增加了这部分代码工作的信心。
我看到界面是红色的,导入是灰色的,因为 IDE 也看不到它。
那么如何解决这个问题呢?
另外,如果您可以提供一个关于如何使用 docker 设置调试器的好教程的链接,这将解决我这个问题,也许我什至不会收到此错误,这也可以使问题得到解决。
更新
基于 Renato“重新加载所有 Maven 项目” - 没有帮助,同样的问题仍然存在。
Trying to set up debugger for spring aplication. Based on the comment from this What creates target directory in spring boot application?
I might need artifacts.
I do not know hot to set up the artifacts for spring boot application, so trying to set up by cmd application article https://www.jetbrains.com/help/idea/debug-a-java-application-using-a-dockerfile.html
I did not set Main class, because I have no idea what is main class in my project. I tried searching function main() but did not find it. So I had set up:
Running Build > Build Artifacts and choosing my jar artifact, I get
/home/agmis/projects/openelis/src/main/java/org/openelisglobal/dataexchange/fhir/FhirUtil.java:4:46
java: package org.itech.fhir.dataexport.core.service does not exist
I think there is high chance that this part of code works, because I have been debuging related code, seen that function. So I am just probably getting this error when building artifacts. And the function is modified on April 5 this year, so this also adds the confidence that this part of code works.
I see interface is in red, and import is grey so because IDE also does not see it.
So how to fix that?
Also if you can give a link to a good tutorial on how to setup debugger with docker which would solve me this problem and maybe I would not even get this error, this could make the problem solved also.
Update
Based on Renato "Reload All Maven Projects" - did not help, same problem still.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论