context:property-placeholder 是个好东西,但我不希望某些 bean 配置使用 placeholder
我只想使用 $ {num} 字符串的相同属性参数。
怎么做?
像:
<bean id="Sku.findSkuRelationByCategory" class="loxia.dao.support.DynamicQueryHolder">
<constructor-arg>
<value>
<![CDATA[select
r.sku_id as sku_id,
r.sku_category_id as sku_category_id
from t_ma_sc_sku_relation r
where r.sku_id in(#foreach($num in [1..$skuCount]) #if($num == 1) :s${num} #else ,:s${num} #end #end)
and r.sku_category_id in(#foreach($num in [1..$categoryCount]) #if($num == 1) :c${num} #else ,:c${num} #end #end)
order by sku_category_id]]>
</value>
</constructor-arg>
</bean>