Remove hardcoded repository fragment from test setup.

See #3830
This commit is contained in:
Christoph Strobl
2025-04-08 15:43:10 +02:00
committed by Mark Paluch
parent fbd214f72e
commit 0e7aef080f

View File

@@ -57,13 +57,13 @@ class AotFragmentTestConfigurationSupport implements BeanFactoryPostProcessor {
public AotFragmentTestConfigurationSupport(Class<?> repositoryInterface) {
this.repositoryInterface = repositoryInterface;
this.repositoryContext = new TestJpaAotRepositoryContext<>(UserRepository.class, null);
this.repositoryContext = new TestJpaAotRepositoryContext<>(repositoryInterface, null);
}
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
TestGenerationContext generationContext = new TestGenerationContext(UserRepository.class);
TestGenerationContext generationContext = new TestGenerationContext(repositoryInterface);
new JpaRepositoryContributor(repositoryContext).contribute(generationContext);