ist es möglich, eine Bohne mit der Verwendung von static final Bereichen CoreProtocolPNames Klasse wie folgt zu definieren:Spring - mit static final Felder (Konstanten) für Bohnen Initialisierung
<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";
}
Wenn es möglich ist, was ist der beste Weg, dies zu tun?
Löschen Sie entweder die Frage oder lassen Sie sie unverändert, aber nicht dazwischen. Vielen Dank. –