Package core

Source Code of core.MongoConfiguration

package core;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.data.document.mongodb.MongoExceptionTranslator;
import org.springframework.data.document.mongodb.MongoFactoryBean;

@Configuration
public class MongoConfiguration {

    public @Bean MongoFactoryBean mongo() {
      return new MongoFactoryBean();
    }

    public @Bean MongoExceptionTranslator mongoExceptionTranslator() {
      return new MongoExceptionTranslator();
    }

    public @Bean PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
      return new PersistenceExceptionTranslationPostProcessor();
    }

}
TOP

Related Classes of core.MongoConfiguration

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.