gpt4 book ai didi

带有 Spring 的 JavaMail - 缺少导入

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:59:34 25 4
gpt4 key购买 nike

我得到一个

The import cannot be resolved

以下导入错误,

import org.springframework.mail.MailSender;
import org.springframework.mail.SimpleMailMessage;

我在类路径中有以下库,但我不确定哪个 jar 文件包含上述导入。有人知道吗?

     org.springframework.aop-3.1.1.RELEASE.jar
org.springframework.asm-3.1.1.RELEASE.jar
org.springframework.beans-3.1.1.RELEASE.jar
org.springframework.context-3.1.1.RELEASE.jar
org.springframework.core-3.1.1.RELEASE.jar
org.springframework.expression-3.1.1.RELEASE.jar
org.springframework.jdbc-3.1.1.RELEASE.jar
org.springframework.orm-3.1.1.RELEASE.jar
org.springframework.web-3.1.1.RELEASE.jar

最佳答案

您缺少 org.springframework.context.support-3.1.1.RELEASE.jar

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>

如果您使用的是 Maven。

关于带有 Spring 的 JavaMail - 缺少导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12097765/

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