camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: mongoDB uri
Date Fri, 22 Aug 2014 15:50:57 GMT
You can use a property. Check this out:
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html


On 22 August 2014 08:41, Andrei Stoica <andrei.ionut.stoica@gmail.com>
wrote:

> Hello,
>
> I have a question regarding the mongoDB connection.
>
> In the CamelContext.xml I have the following declaration:
>
>        <bean id="myDb" class="com.mongodb.Mongo">
>         <constructor-arg index="0">
>         <bean class="com.mongodb.MongoURI">
>             <constructor-arg index="0"
> value="mongodb://user:pass@localhost:1111/db"
> />
>         </bean>
>         </constructor-arg>
>     </bean>
>
>
> When I run using this configuration all works ok. My problem is that I will
> not know the mongo uri until the runtime. Is there a way I can change the
> mongo DB uri at runtime?
>
> Best regards!
>



-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message