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.TypeMismatc
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/17 01:04:06
![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.TypeMismatc](/uploads/image/z/12820045-13-5.jpg?t=org.springframework.beans.factory.BeanCreationException%3AError+creating+bean+with+name+%27tgMailSender%27+defined+in+ServletContext+resource+%5B%2FWEB-INF%2Fdatasource.xml%5D%3AInitialization+of+bean+failed%3B+nested+exception+is+org.springframework.beans.TypeMismatc)
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.TypeMismatc
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 found
配置邮件时出现以上错误,都是javax.mail.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.TypeMismatc
是不是有两个版本的.jar在里面.