首页 > 编程语言 > 详细

spring加载配置文件无法解析占位符问题:Could not resolve placeholder 'from' in string value "${from}"

时间:2018-07-09 10:14:30      阅读:322      评论:0      收藏:0      [点我收藏+]

 

 

Could not resolve placeholder ‘from‘ in string value "${from}"

 

 

解决:

  在spring的xml配置文件中当有多个*.properties文件需要加载时,

  应当集中在一个xml文件中加载,建议在主xml文件中加载,即(applicationContext.xml)中加载,

  这样就不需要关注 子xml文件 与 *.properties 加载顺序问题

 

  加载多个*.properties文件,以‘,‘隔开

  <context:property-placeholder location="classpath:db.properties,classpath:mail.properties"/>

 

记以备查!

spring加载配置文件无法解析占位符问题:Could not resolve placeholder 'from' in string value "${from}"

原文:https://www.cnblogs.com/lin-nest/p/9279177.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!