Dependent error introduced mail SpringBoot

报错:Missing artifact org.springframework.boot:spring-boot-starter-mail:jar:2.0.3

Before importing the same mistakes log4j Times, and finally not been resolved, with the slf4j, this time encountered the same problem, can not sit idly by, because I have to use to send e-mail.

Baidu variety of information, I finally found it. . .

Resolve as follows:

First, the mail is added dependent, given Missing artifact org.springframework.boot: spring-boot-starter-mail: jar: 2.0.3

<! - Add Mail relies the begin -> 
        < dependency > 
            < the groupId > org.springframework.boot </ the groupId > 
            < the artifactId > Spring-Boot-Starter-mail </ the artifactId > 
        </ dependency > 
<! - add messages reliance End ->

Second, find the configuration file when the maven installation setting.xml

.m2 subdirectory Maven settings.xml file typically present in the installation directory conf subdirectory or directory below the user.

This is my catalog:

D:\software\apache-maven-3.5.0\conf

 

Third, find <mirrors> add a mirror resource:

    <mirror>
       <id>nexus</id>
       <name>internal nexus repository</name>
       <url>http://repo.maven.apache.org/maven2</url>
       <mirrorOf>central</mirrorOf>
    </mirror>

Four, maven-> update, select the Force Update on OK

 

Guess you like

Origin www.cnblogs.com/steveshao/p/11693071.html