org.springframework.mail.MailAuthenticationException: Authentication failed
用Spring傳送郵件的出現這個錯誤,程式碼如下:
JavaMailSenderImpl mailSender = new JavaMailSenderImpl(); mailSender.setHost(properties.getProperty("HOST.SERVER_")); mailSender.setUsername(properties.getProperty("USERNAME_")); mailSender.setPassword(properties.getProperty("PASSWORD_")); SimpleMailMessage smm = new SimpleMailMessage(); smm.setFrom(mailSender.getUsername()); smm.setTo(email);
郵箱用的是163的郵箱
[email protected]
PASSWORD_=XXX
HOST.SERVER_=smtp.163.com
報這個錯是因為驗證錯誤,是163郵箱沒有開啟smtp服務,並獲取客戶端授權碼,再用授權碼作為password登入即可。
相關推薦
SpringBoot傳送郵件遇到的錯誤:org.springframework.mail.MailAuthenticationException: Authentication failed;
SpringBoot傳送郵件時遇到的異常:org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.Authentic
spring傳送郵件時遇到錯誤org.springframework.mail.MailAuthenticationException: Authentication failed;
spring 傳送郵件時遇到異常org.springframework.mail.MailAuthenticationException org.springframework.mail.MailAuthenticationException: Authentication
org.springframework.mail.MailAuthenticationException: Authentication failed
用Spring傳送郵件的出現這個錯誤,程式碼如下: JavaMailSenderImpl mailSender = new JavaMailSenderImpl(); mailSender.setHost(properties.getProperty("HOS
org.springframework.mail.MailSendException: Failed messages: javax.mail.SendFailedException: Invalid Addresses
toa false ssa net 代碼 ati private res erb 問題 org.springframework.mail.MailSendException: Failed messages: javax.mail.SendFailedException:
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: The temporar
一、異常資訊 ROOT] is not valid at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest.handleParseFailure(StandardMultipartHttpServlet
SpringBoot中測試Elasticsearch,在測試ElasticsearchRepository文件操作中的查詢時報錯org.springframework.data.elasticsearch.ElasticsearchException: failed to map source **
問題描述: 在SpringBoot中測試Elasticsearch的時候,當測試ElasticsearchRepository的文件操作的時候,在呼叫find()查詢方法時報錯,錯誤如下: com.fasterxml.jackson.databind.exc.InvalidDefinitionExc
springcloud 入門第一坑[org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process]
springcloud 需要和springboot搭配使用,而其中,對於初學者來說,版本的搭配是相對關鍵 .通常網上的教程都會有相應的版本搭配,而我因為已經是用了springboot 1.5.10 所以,只能挑選對應的springcloud版本,如果版本沒挑選對,就會出現異常
Springboot 啟動時org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse config
springboot 專案在Idea部署可以正常執行,但是無論打成jar或者war,啟動都會報錯,具體錯誤如下:16:31:16 [main] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Re
Spring MVC 單元測試異常 Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file
read cti exe document ive pri simple fff ces Sping 3.2.8.RELEASE + sping mvc + JDK 1.8運行異常。 java.lang.IllegalStateException: Failed to
Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.6.RELEASE:repackage failed: Unable to find main class
spl final package exce main project clas ini exit 異常 [INFO] --- spring-boot-maven-plugin:1.5.6.RELEASE:repackage (default) @ spring-boot
error:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
poi return spring use fail err process sin mapping 問題:調用的方法在一個接口類中,但我並沒有註入那個被調用的類 解決:在UserEntity前加上@Autowired @Controller public class
org.springframework.web.util.NestedServletException Handler processing failed; n
pos spa str ogl div body proc span list() 因為谷歌的lists不支持或使用, 所有要改成java的list工具 谷歌list使用: import com.google.common.collect.Lists; .... L
shiro筆記-"Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - ylw, rememberMe=false]. Possible unexpected e
在學習shiro過程中遇到這個錯誤,在網上找了好久資料也沒找到解決辦法,大概都是說和傳入的值有問題。於是我試著耐心看我自己的報錯資訊,最終找到了原因並解決。每個人的問題可能都會有差異,所以建議大家耐心的看看它的報錯資訊。下面說一下我的問題。 這是我的詳細報錯資訊,雖然不能完全理解,但是可以看出是User
【Oracle】修改資料庫時間策略。org.springframework.web.util.NestedServletException: Request processing failed;
從log很明顯可以看出是資料庫連線失敗,但是資料庫明明是開著的,出現這個錯誤有著一定的概率,刷好多次會出現一次然後又好了,然後用plsql連線資料庫發現跳出修改密碼的提醒,此時我們將密碼改為原來密碼多加個1,之後使用者可能被鎖定。 1.先解鎖 alter user XXGS accou
Sping 3.2.3 異常 Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed
Spring MVC 單元測試異常 Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file Sping 3.2.8.RELEASE + sping mvc
嚴重: Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: I
嚴重: Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing
[已解決] 數據庫連接問題Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;
-c temp 更改 cnblogs otg tor exceptio depend cli 我在學習SSM框架做一個小demo 時遇到了這個問題,具體的報錯時 Error querying database. Cause: org.springframework.jd
Application startup failed org.springframework.beans.factory.BeanDefinitionStoreException
最近使用了spring boot開發專案,但是對這個框架的瞭解不深,現在把每次遇到的坑發出來作為記錄。 錯誤 Application startup failed org.springframework.beans.factory.BeanDefinitionStoreExcepti
【spring cloud】在spring cloud服務中,打包ms-core失敗,報錯Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.4.RELEASE:repackage (default
在spring cloud服務中,有一個ms-code專案,只為所有的微服務提供核心依賴和工具類,沒有業務意義,作為核心依賴使用。所以沒有main方法,沒有啟動類。 在spring cloud整體打包的過程中報錯: [INFO] --- maven-jar-plugin:3.0.2:jar (def
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.Error: Unresolved compilation problem: