我在tomcat中配置邮件服务器,用的是javax.mail.Session
<Resource name="mail/tgMailSession"
    auth="Container"
    type="javax.mail.Session"
    mail.smtp.host="127.0.0.1" />在java端接收的类中定义javax.mail.Session的属性session,但是程序启动时出现类型不匹配的错误org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tgMailSender' defined in ServletContext resource [/WEB-INF/datasource.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [javax.mail.Session] to required type [javax.mail.Session] for property 'session'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [javax.mail.Session] to required type [javax.mail.Session] for property 'session': no matching editors or conversion strategy foundexception邮件服务器java