`
cheng.xinwei
  • 浏览: 78497 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

【spring】Placeholder的坑

阅读更多
今天自己在搭建项目的时候,抛出了如下异常。
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'activemq.connectionFactory' defined in class path resource [plus/dy-activemq.xml]: Could not resolve placeholder 'plus.activemq.connectionUrl.test'

但是 'plus.activemq.connectionUrl.test' 配置在配置文件中肯定存在,而且没有拼写错误。找了好久才发现,当项目需要写多个Placeholder的时候,一定要添加ignoreUnresolvablePlaceholders的属性为true

如:
<bean class="com.dooioo.mq.monitor.common.AppPropertyConfigurer">
    <property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>


添加之后就可以成功运行了
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics