gpt4 book ai didi

spring - 我的 IDEA tomcat 部署中没有包含本地安装的 jar

转载 作者:行者123 更新时间:2023-11-28 22:58:59 25 4
gpt4 key购买 nike

当我使用 IntelliJ 编译时,我的 IDEA 项目可以正常编译和构建。

出于某种原因,当我使用 exploded-war 部署到 tomcat 时,我的 1 个 jar 没有包含在部署中,我的 spring 应用程序无法加载,因为它找不到类。

有问题的 jar 是本地安装的 maven 依赖项,即在我的笔记本电脑上

难道这就是它被 IDEA 跳过的原因吗?它可能会尝试使用 Maven 查找 jar,但由于它是本地的,所以不能并跳过它?

我该如何解决这个问题?

IDEA 项目是一个 Maven 模块,构建良好。

最佳答案

将该 jar 放入 tomcat 的 libs 文件夹中,或者使用 maven assembly 插件将其嵌入到您自己的 jar 中。 https://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html

关于spring - 我的 IDEA tomcat 部署中没有包含本地安装的 jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22389348/

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