【发布时间】:2011-02-23 06:41:25
【问题描述】:
是否可以像这样使用 CoreProtocolPNames 类的静态最终字段来定义 bean:
<bean id="httpParamBean" class="org.apache.http.params.HttpProtocolParamBean">
<constructor-arg ref="httpParams"/>
<property name="httpElementCharset" value="CoreProtocolPNames.HTTP_ELEMENT_CHARSET" />
<property name="version" value="CoreProtocolPNames.PROTOCOL_VERSION">
</bean>
public interface CoreProtocolPNames {
public static final String PROTOCOL_VERSION = "http.protocol.version";
public static final String HTTP_ELEMENT_CHARSET = "http.protocol.element-charset";
}
如果可能,最好的方法是什么?
【问题讨论】:
-
要么删除问题,要么保持原样,但不能介于两者之间。谢谢。
标签: spring definition javabeans