[#ftl]
    <bean id="mongoClient" class="com.mongodb.client.MongoClients" factory-method="create">
        <argument value="[=properties.connectionString]"/>
    </bean>

    <bean id="[=objectId]" class="org.apache.camel.component.mongodb.MongoDbComponent">
        [#if properties??]
            [#list properties as key, value]
                [#if key?starts_with("camel_")] [#-- we add parent Camel component properties --]
        <property name="[=key[6..]]" value="[#if value?is_string][=value][#else][=value?c][/#if]"/>
                [/#if]
            [/#list]
        [/#if]
        <property name="mongoConnection" ref="mongoClient"/>
    </bean>
