Upgraded to Spring Data Codd
Update AbstractRepositoryConfigurationSourceSupport to use the newly introduced RepositoryConfigurationDelegate instead of effectively reimplementing Spring Data Commons functionality which was prone to changes in the API (code that wasn't considered to be API in the first place). Switch from implementing BeanClassLoaderAware to ResourceLoaderAware to avoid having to set up a DefaultResourceLoader which should also improve IDE integration. Fixes gh-236
This commit is contained in:
committed by
Phillip Webb
parent
be73535611
commit
929bd902be
@@ -21,12 +21,15 @@ import javax.persistence.EntityManagerFactory;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
|
||||
import org.springframework.boot.autoconfigure.data.alt.CityMongoDbRepository;
|
||||
import org.springframework.boot.autoconfigure.data.jpa.City;
|
||||
import org.springframework.boot.autoconfigure.data.jpa.CityRepository;
|
||||
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.ComponentScan.Filter;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@@ -78,7 +81,7 @@ public class JpaRepositoriesAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableJpaRepositories(basePackageClasses = org.springframework.boot.autoconfigure.data.alt.CityJpaRepository.class)
|
||||
@EnableJpaRepositories(basePackageClasses = org.springframework.boot.autoconfigure.data.alt.CityJpaRepository.class, excludeFilters = { @Filter(type = FilterType.ASSIGNABLE_TYPE, value = CityMongoDbRepository.class) })
|
||||
@TestAutoConfigurationPackage(City.class)
|
||||
protected static class CustomConfiguration {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user