gpt4 book ai didi

spring - 找不到 javax.mail.internet.MimeMessage 的类文件

转载 作者:行者123 更新时间:2023-12-04 00:26:53 26 4
gpt4 key购买 nike

构建项目时出现以下错误。

City\controller\MyMailHelper.java:59: cannot access javax.mail.internet.MimeMessage
class file for javax.mail.internet.MimeMessage not found

在应用程序代码中,我指的是以下导入。
import org.springframework.mail.javamail.MimeMailMessage;
import org.springframework.mail.javamail.MimeMessageHelper;

下面给出了从我的项目的 maven 依赖树中获取的 Spring 依赖。有人可以帮我确定哪个依赖项导致了这个问题。
Line 27:  |  +- org.springframework:spring-jdbc:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
Line 28: | +- org.springframework:spring-orm:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
Line 29: | +- org.springframework:spring-jms:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
Line 52: | +- org.springframework:spring-beans:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile
Line 53: | +- org.springframework:spring-aop:jar:3.2.1.RELEASE:compile (version managed from 3.2.1.RELEASE; scope managed from compile)
Line 64: +- org.springframework:spring-core:jar:3.2.1.RELEASE:compile
Line 65: +- org.springframework:spring-context:jar:3.2.1.RELEASE:compile
Line 66: | \- org.springframework:spring-expression:jar:3.2.1.RELEASE:compile
Line 67: +- org.springframework:spring-web:jar:3.2.1.RELEASE:compile
Line 69: +- org.springframework:spring-webmvc:jar:3.2.1.RELEASE:compile
Line 74: | +- org.springframework.ws:spring-ws:jar:all:2.0.5.RELEASE:compile
Line 77: | +- org.springframework:spring-tx:jar:3.1.3.RELEASE:compile
Line 90: | +- org.springframework.ws:spring-ws-core:jar:2.1.2.RELEASE:compile (version managed from 2.1.2.RELEASE)
Line 91: | | +- org.springframework.ws:spring-xml:jar:2.1.2.RELEASE:compile
Line 93: | +- org.springframework:spring-oxm:jar:3.2.1.RELEASE:compile
Line 99: +- org.springframework:spring-test:jar:3.2.1.RELEASE:test

最佳答案

您似乎缺少对 javax.mail 的依赖。

尝试将其添加到您的 Maven 依赖项中。

<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>

关于spring - 找不到 javax.mail.internet.MimeMessage 的类文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20544245/

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