java.lang.UnsupportedOperationException: Method not yet implemented

xiaoxiao2021-02-28  3

apache commons-email发送邮件报错

 java.lang.UnsupportedOperationException: Method not yet implemented        at javax.mail.internet.MimeMultipart.<init>(MimeMultipart.java:37)

        at org.apache.commons.mail.MultiPartEmail.createMimeMultipart(MultiPartEmail.java:505)

解决方案:

    mvn dependency:tree查看下目录树

   看下哪个包里面有这个 geronimo-spec-javamail-1.3.1-rc3,跟email的包冲突,

可以去掉这个包,或者exclue

<exclusions>              <exclusion>                  <artifactId>geronimo-spec</artifactId>                  <groupId>geronimo-spec-javamail</groupId>              </exclusion>   </exclusions>  

转载请注明原文地址: https://www.6miu.com/read-1750076.html

最新回复(0)