camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilter <>
Subject Kubernetes/Openshift service endpoint parameter to a Bean
Date Wed, 07 Dec 2016 23:21:48 GMT

I am creating a microservice by using Jetty and spring dsl. I need to access
the mongo service which is already created in openshift. Based on the camel
documentation i need to create a MongoBean first in order to access mongo
component. The question in here how can i give the "" and
"service.port" parameters to a Bean as constructor parameters ?

<bean class="com.mongodb.Mongo" id="MongoBean">
      <constructor-arg name="host" value="${}" />
      <constructor-arg name="port" value="${service.port:mongo}" />

I tried this and below approach by reading it from properties file and both
did not work.

***Spring XML ****
<bean id="bridgePropertyPlaceholder"
  		<property name="location" value=""/>
    <bean class="com.mongodb.Mongo" id="mongoBean">
    	<constructor-arg name="host" value="${}" />
        <constructor-arg name="port" value="${mongodb.port}" />

Thanks for the help

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message