当前位置: 动力学知识库 > 问答 > 编程问答 >

spring - Using Property Placeholder for Bean ID

问题描述:

In Spring 3.1, is it possible to use a property placeholder to resolve the 'id' attribute of a bean?

I would like, for example, to do the following in my context.xml file:

<context:property-placeholder/>

<int:channel id="${channel.name}"/>

网友答案:

No, not for the id and the name attributes - this is based on what I have seen of how PropertySourcesPlaceholderConfigurer resolves the placeholders.

分享给朋友:
您可能感兴趣的文章:
随机阅读: