From 0e7aef080f36dbb575c1f6a1912325d6a05b07d3 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 8 Apr 2025 15:43:10 +0200 Subject: [PATCH] Remove hardcoded repository fragment from test setup. See #3830 --- .../repository/aot/AotFragmentTestConfigurationSupport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotFragmentTestConfigurationSupport.java b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotFragmentTestConfigurationSupport.java index 670c871ca..b73f9cc0d 100644 --- a/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotFragmentTestConfigurationSupport.java +++ b/spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotFragmentTestConfigurationSupport.java @@ -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);