【问题标题】:IDEA cannot package the project that includes the custom jar file into the war package?IDEA无法将包含自定义jar文件的项目打包成war包?
【发布时间】:2019-01-16 21:13:42
【问题描述】:

我有一个自定义 jar 文件,其中包含一些我想使用的实用程序包。当我将 jar 文件放入我的 SpringBoot 2.0 项目时,它工作得非常好(没有错误,这些 util 类工作正常)。但是当我将项目(包含自定义jar文件的SpringBoot项目)打包到war包中时,IDEA提示错误信息: enter image description here

我的SpringBoot项目的项目结构是: enter image description here

并且: enter image description here

不知道是什么问题,请帮帮我,非常感谢! :)

【问题讨论】:

  • 最好将您的屏幕截图作为问题中的示例。看看stackoverflow.com/help/mcve
  • 好的,我以后会注意的,谢谢。 :)
  • @user10833508 见jetbrains.com/help/idea/artifacts.html。资源目录是罐子的错误位置。如果项目是基于 Maven/Gradle 的,你应该修改 pom.xml/build.gradle 文件来包含额外的依赖。

标签: java spring-boot intellij-idea package


【解决方案1】:

第二张图片有问题,这里是正确的:enter image description here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-02-05
    • 1970-01-01
    • 1970-01-01
    • 2011-10-17
    • 2015-12-26
    • 1970-01-01
    • 1970-01-01
    • 2013-05-14
    相关资源
    最近更新 更多