spring boot - consul properties in xml configuration -
i trying use consul centralised configuration spring application. when use annotation based configuration example 1 works perfectly.
//example 1 @configuration @enableconsulpropertysource({"root/api/defaults", "root/global/defaults"}) public class applicationconfiguration { @value("httpclient.pool.maxtotal") private int maxtotal; @value("httpclient.pool.defaultmaxperroute") private int maxperroute; ... }
however not find way use consul properties directly in xml.
<bean id="properties" class="org.springframework.somebeantoenableconsulinxmlconfig"> <property name="locations"> <list> <value>root/api/defaults</value> <value>root/global/defaults</value> </list> </property> </bean> ... <bean name="http.client" class="com.xxx.httpclient"> <property name="maxtotal" value="${httpclient.pool.maxtotal}" /> <property name="defaultmaxperroute" value="${httpclient.pool.defaultmaxperroute}" /> </bean>
does spring has somebeantoenableconsulinxmlconfig or hints on implementing class?
Comments
Post a Comment