All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.template.mongo.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:mongo="http://www.springframework.org/schema/data/mongo"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation=" 
        http://www.springframework.org/schema/beans   
        http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/data/mongo 
        http://www.springframework.org/schema/data/mongo/spring-mongo.xsd">

    <mongo:mapping-converter
            th:attr="id=${dataSource}+'MappingConverter',
            db-factory-ref=${dataSource},
    		type-mapper-ref='defaultMongoTypeMapper',
    		base-package=${domainPackage}"/>

    <mongo:template
            th:attr="id=${dataSource}+'MongoTemplate',
            db-factory-ref=${dataSource},
            converter-ref=${dataSource}+'MappingConverter'"/>

    <mongo:repositories
            th:attr="mongo-template-ref=${dataSource}+'MongoTemplate',
            base-package=${basePackage}"/>

    <bean id="mongoRepositoryFactory"
          class="org.springframework.data.mongodb.repository.support.MongoRepositoryFactory">
        <constructor-arg th:attr="ref=${dataSource}+'MongoTemplate'"/>
    </bean>
</beans>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy