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

lodsve.mongodb.config.MongoConfiguration Maven / Gradle / Ivy

The newest version!
package lodsve.mongodb.config;

import lodsve.core.autoconfigure.annotations.EnableConfigurationProperties;
import lodsve.mongodb.core.MongoRepositoryBeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper;

/**
 * 基本配置.
 *
 * @author sunhao([email protected])
 * @version V1.0, 16/1/21 下午10:15
 */
@Configuration
@EnableConfigurationProperties(MongoProperties.class)
@EnableAspectJAutoProxy
@ComponentScan("lodsve.mongodb.connection")
public class MongoConfiguration {
    @Bean
    public DefaultMongoTypeMapper defaultMongoTypeMapper() {
        return new DefaultMongoTypeMapper();
    }

    @Bean
    public MongoRepositoryBeanPostProcessor beanPostProcessor() {
        return new MongoRepositoryBeanPostProcessor();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy