package com.eactive.eai.transformer.function.jpa;

import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.TestPropertySource;

import com.eactive.eai.common.util.ApplicationContextProvider;
import com.eactive.eai.data.jpa.BaseRepositoryImpl;
import com.eactive.eai.data.mapper.QualifiedMappers;
import com.eactive.eai.data.mapper.QualifiedMappersImpl;

@Configuration
@ComponentScan(basePackages = { "com.eactive.eai.transformer", "com.eactive.eai.common.property" })
@EntityScan({ "com.eactive.eai.data.entity.onl.property", "com.eactive.eai.data.entity.onl.transformer" })
@EnableJpaRepositories(basePackages = { "com.eactive.eai.transformer",
		"com.eactive.eai.common.property" }, repositoryBaseClass = BaseRepositoryImpl.class)
@TestPropertySource(properties = { "spring.main.allow-bean-definition-overriding=true" })
public class TransformJPATestConfiguration {

	@Bean
	ApplicationContextProvider applicationContextProvider() {
		return new ApplicationContextProvider();
	}

	@Bean
	QualifiedMappers qualifiedMappers() {
		return new QualifiedMappersImpl();
	}

}
