Invalid bean definition with name 'mailSender' defined in class path resource [office.mail.xml

来源:互联网 发布:c语言0xff是什么意思 编辑:程序博客网 时间:2024/06/05 04:26

今天项目出现这个异常。看完整的。

org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'mailSender' defined in class path resource [office.mail.xml]: Could not resolve placeholder 'mail.smtp.host'

注意关键字:placeholder。
配置文件中出现了多个或PropertyPlaceholderConfigurer
所有都要加上ignore-unresolvable=”true”,这样就好了。
原因是,我将spring做了拆分,出现了多个placeholder。

0 0
原创粉丝点击