//package xxxxx.yyyyy.zzzzz.api;
//
//import javax.persistence.EntityManagerFactory;
//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.context.annotation.ImportResource;
//import org.springframework.orm.jpa.JpaTransactionManager;
//import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
//import org.springframework.transaction.PlatformTransactionManager;
//import org.springframework.transaction.annotation.EnableTransactionManagement;
//import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
//import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
//
//@Configuration
//@EnableAspectJAutoProxy
//@EnableTransactionManagement
////@ComponentScan(basePackages = {
////    "xxxxx.yyyyy.zzzzz.application",
////    "xxxxx.yyyyy.zzzzz.persistence"
////})
//@ComponentScan(basePackages = {
//    "xxxxx.yyyyy.zzzzz.application"
//})
//@ImportResource(value = {
//    "classpath:META-INF/spring/xyz-persistence.xml"
//})
//public class AppConfig {
//
//    @Bean
//    public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
//        LocalContainerEntityManagerFactoryBean bean = new LocalContainerEntityManagerFactoryBean();
//        bean.setPersistenceXmlLocation("classpath:META-INF/persistence.xml");
//        return bean;
//    }
//
//    @Bean
//    public PlatformTransactionManager transactionManager(final EntityManagerFactory emf) {
//        JpaTransactionManager bean = new JpaTransactionManager();
//        bean.setEntityManagerFactory(emf);
//        return bean;
//    }
//
//    @Bean
//    public LocalValidatorFactoryBean validator() {
//        LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
//        return bean;
//    }
//
//    @Bean
//    public MethodValidationPostProcessor methodValidationPostProcessor() {
//        MethodValidationPostProcessor bean = new MethodValidationPostProcessor();
//        return bean;
//    }
//}
