JavaMail with Spring - Missing Import

I get

Import is not possible.

for the following imports,

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

I have the following libraries in the classpath, but I'm not sure which jar file has the above import. Somebody knows?

  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 
+6
source share
3 answers

You are missing org.springframework.context.support-3.1.1.RELEASE.jar

or

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

if you use Maven.

+25
source

You should add pom.xml:

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

and

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

$ mvn clean install worked for me. :)

+3
source

org.springframework.context.support-3.xyRELEASE.jar is missing. You can download "spring -context-support-3.2.0.RELEASE.jar" from the following URL:

http://search.maven.org/#search%7Cga%7C1%7Cspring-context-support

Go to the Java Build Path and add as an external banner.

0
source

Source: https://habr.com/ru/post/923584/


All Articles