package fr.openwide.core.showcase.core.config.spring;

import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;

import fr.openwide.core.jpa.config.spring.provider.JpaPackageScanProvider;
import fr.openwide.core.jpa.more.business.JpaMoreBusinessPackage;
import fr.openwide.core.jpa.security.business.JpaSecurityBusinessPackage;
import fr.openwide.core.jpa.security.config.spring.AbstractConfiguredJpaSecurityJpaConfig;
import fr.openwide.core.showcase.core.business.ShowcaseCoreBusinessPackage;

@Configuration
@EnableAspectJAutoProxy
public class ShowcaseCoreJpaConfig extends AbstractConfiguredJpaSecurityJpaConfig {

	/**
	 * Déclaration des packages de scan pour l'application.
	 */
	@Override
	@Bean
	public JpaPackageScanProvider applicationJpaPackageScanProvider() {
		return new JpaPackageScanProvider(ShowcaseCoreBusinessPackage.class.getPackage());
	}

	@Override
	@Bean
	public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
		return super.entityManagerFactory();
	}

	@Override
	@Bean
	public DataSource dataSource() {
		return super.dataSource();
	}

	@Bean
	public JpaPackageScanProvider jpaSecurityPackageScanProvider() {
		return new JpaPackageScanProvider(JpaSecurityBusinessPackage.class.getPackage());
	}

	@Bean
	public JpaPackageScanProvider jpaMorePackageScanProvider() {
		return new JpaPackageScanProvider(JpaMoreBusinessPackage.class.getPackage());
	}

}

@@ -52,38 +52,8 @@
 g;%0A%0A
-import javax.sql.DataSource;%0A%0A
 impo
@@ -100,16 +100,16 @@
 n.Bean;%0A
+
 import o
@@ -234,83 +234,8 @@
 oxy;
-%0Aimport org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
 %0A%0Aim
@@ -311,148 +311,8 @@
 er;%0A
-import fr.openwide.core.jpa.more.business.JpaMoreBusinessPackage;%0Aimport fr.openwide.core.jpa.security.business.JpaSecurityBusinessPackage;%0A
 impo
@@ -745,32 +745,32 @@
 canProvider() %7B%0A
+
 %09%09return new Jpa
@@ -846,538 +846,6 @@
 %09%7D%0A%0A
-%09@Override%0A%09@Bean%0A%09public LocalContainerEntityManagerFactoryBean entityManagerFactory() %7B%0A%09%09return super.entityManagerFactory();%0A%09%7D%0A%0A%09@Override%0A%09@Bean%0A%09public DataSource dataSource() %7B%0A%09%09return super.dataSource();%0A%09%7D%0A%0A%09@Bean%0A%09public JpaPackageScanProvider jpaSecurityPackageScanProvider() %7B%0A%09%09return new JpaPackageScanProvider(JpaSecurityBusinessPackage.class.getPackage());%0A%09%7D%0A%0A%09@Bean%0A%09public JpaPackageScanProvider jpaMorePackageScanProvider() %7B%0A%09%09return new JpaPackageScanProvider(JpaMoreBusinessPackage.class.getPackage());%0A%09%7D%0A%0A
 %7D%0A

rollback modifications inutiles