Browse Source

Adapt to AOT Infrastructure changes in Commons.

See spring-projects/spring-data-commons#3267
pull/4026/head
Mark Paluch 6 months ago
parent
commit
a5b5c2e610
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 17
      spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/AotRepositoryQueryMethodBenchmarks.java
  2. 15
      spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java
  3. 4
      spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotContributionIntegrationTests.java
  4. 20
      spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotFragmentTestConfigurationSupport.java
  5. 69
      spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/TestJpaAotRepositoryContext.java
  6. 77
      spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java

17
spring-data-jpa/src/jmh/java/org/springframework/data/jpa/benchmark/AotRepositoryQueryMethodBenchmarks.java

@ -40,6 +40,7 @@ import org.openjdk.jmh.annotations.Warmup; @@ -40,6 +40,7 @@ import org.openjdk.jmh.annotations.Warmup;
import org.springframework.aot.test.generate.TestGenerationContext;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultBeanNameGenerator;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.test.tools.TestCompiler;
@ -56,6 +57,7 @@ import org.springframework.data.jpa.repository.support.JpaRepositoryFactory; @@ -56,6 +57,7 @@ import org.springframework.data.jpa.repository.support.JpaRepositoryFactory;
import org.springframework.data.projection.ProjectionFactory;
import org.springframework.data.projection.SpelAwareProxyProjectionFactory;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
import org.springframework.data.repository.config.RepositoryConfigurationSource;
import org.springframework.data.repository.core.RepositoryMetadata;
import org.springframework.data.repository.core.support.RepositoryComposition;
import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport;
@ -82,11 +84,16 @@ public class AotRepositoryQueryMethodBenchmarks { @@ -82,11 +84,16 @@ public class AotRepositoryQueryMethodBenchmarks {
public static class BenchmarkParameters {
public static Class<?> aot;
public static TestJpaAotRepositoryContext<PersonRepository> repositoryContext = new TestJpaAotRepositoryContext<>(
PersonRepository.class, null,
new AnnotationRepositoryConfigurationSource(AnnotationMetadata.introspect(SampleConfig.class),
EnableJpaRepositories.class, new DefaultResourceLoader(), new StandardEnvironment(),
Mockito.mock(BeanDefinitionRegistry.class), DefaultBeanNameGenerator.INSTANCE));
public static TestJpaAotRepositoryContext<PersonRepository> repositoryContext;
static {
RepositoryConfigurationSource configurationSource = new AnnotationRepositoryConfigurationSource(
AnnotationMetadata.introspect(SampleConfig.class), EnableJpaRepositories.class, new DefaultResourceLoader(),
new StandardEnvironment(), Mockito.mock(BeanDefinitionRegistry.class), DefaultBeanNameGenerator.INSTANCE);
repositoryContext = new TestJpaAotRepositoryContext<>(new DefaultListableBeanFactory(), PersonRepository.class,
null, configurationSource);
}
EntityManager entityManager;
RepositoryComposition.RepositoryFragments fragments;

15
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/config/JpaRepositoryConfigExtension.java

@ -58,6 +58,7 @@ import org.springframework.core.env.Environment; @@ -58,6 +58,7 @@ import org.springframework.core.env.Environment;
import org.springframework.core.io.ResourceLoader;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.data.aot.AotContext;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.aot.JpaRepositoryContributor;
import org.springframework.data.jpa.repository.support.DefaultJpaContext;
@ -374,10 +375,22 @@ public class JpaRepositoryConfigExtension extends RepositoryConfigurationExtensi @@ -374,10 +375,22 @@ public class JpaRepositoryConfigExtension extends RepositoryConfigurationExtensi
public static class JpaRepositoryRegistrationAotProcessor extends RepositoryRegistrationAotProcessor {
public static final String USE_ENTITY_MANAGER = "spring.aot.jpa.repositories.use-entitymanager";
private static final String MODULE_NAME = "jpa";
protected @Nullable JpaRepositoryContributor contribute(AotRepositoryContext repositoryContext,
@Override
protected void configureTypeContributions(AotRepositoryContext repositoryContext,
GenerationContext generationContext) {
super.configureTypeContributions(repositoryContext, generationContext);
}
@Override
protected void configureTypeContribution(Class<?> type, AotContext aotContext) {
aotContext.typeConfiguration(type, config -> config.contributeAccessors().forQuerydsl());
}
@Override
protected @Nullable JpaRepositoryContributor contributeAotRepository(AotRepositoryContext repositoryContext) {
if (!repositoryContext.isGeneratedRepositoriesEnabled(MODULE_NAME)) {
return null;

4
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotContributionIntegrationTests.java

@ -30,10 +30,8 @@ import org.springframework.context.annotation.FilterType; @@ -30,10 +30,8 @@ import org.springframework.context.annotation.FilterType;
import org.springframework.context.aot.ApplicationContextAotGenerator;
import org.springframework.core.io.InputStreamResource;
import org.springframework.core.io.InputStreamSource;
import org.springframework.data.aot.AotContext;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.jpa.repository.config.InfrastructureConfig;
import org.springframework.mock.env.MockPropertySource;
/**
* Integration tests for AOT processing.
@ -70,8 +68,6 @@ class AotContributionIntegrationTests { @@ -70,8 +68,6 @@ class AotContributionIntegrationTests {
private static TestGenerationContext generate(Class<?>... configurationClasses) {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.getEnvironment().getPropertySources()
.addFirst(new MockPropertySource().withProperty(AotContext.GENERATED_REPOSITORIES_ENABLED, "true"));
context.register(configurationClasses);
ApplicationContextAotGenerator generator = new ApplicationContextAotGenerator();

20
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/AotFragmentTestConfigurationSupport.java

@ -47,6 +47,7 @@ import org.springframework.data.jpa.repository.sample.SampleConfig; @@ -47,6 +47,7 @@ import org.springframework.data.jpa.repository.sample.SampleConfig;
import org.springframework.data.projection.ProjectionFactory;
import org.springframework.data.projection.SpelAwareProxyProjectionFactory;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
import org.springframework.data.repository.config.RepositoryConfigurationSource;
import org.springframework.data.repository.core.RepositoryMetadata;
import org.springframework.data.repository.core.support.RepositoryComposition;
import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport;
@ -69,7 +70,8 @@ public class AotFragmentTestConfigurationSupport implements BeanFactoryPostProce @@ -69,7 +70,8 @@ public class AotFragmentTestConfigurationSupport implements BeanFactoryPostProce
private final Class<?> repositoryInterface;
private final boolean registerFragmentFacade;
private final TestJpaAotRepositoryContext<?> repositoryContext;
private final Class<?>[] additionalFragments;
private final RepositoryConfigurationSource configSource;
public AotFragmentTestConfigurationSupport(Class<?> repositoryInterface) {
this(repositoryInterface, SampleConfig.class, true);
@ -82,22 +84,22 @@ public class AotFragmentTestConfigurationSupport implements BeanFactoryPostProce @@ -82,22 +84,22 @@ public class AotFragmentTestConfigurationSupport implements BeanFactoryPostProce
public AotFragmentTestConfigurationSupport(Class<?> repositoryInterface, Class<?> configClass,
boolean registerFragmentFacade, Class<?>... additionalFragments) {
this.repositoryInterface = repositoryInterface;
RepositoryComposition composition = RepositoryComposition
.of((List) Arrays.stream(additionalFragments).map(RepositoryFragment::structural).toList());
this.repositoryContext = new TestJpaAotRepositoryContext<>(repositoryInterface, composition,
new AnnotationRepositoryConfigurationSource(AnnotationMetadata.introspect(configClass),
EnableJpaRepositories.class, new DefaultResourceLoader(), new StandardEnvironment(),
Mockito.mock(BeanDefinitionRegistry.class), DefaultBeanNameGenerator.INSTANCE));
this.registerFragmentFacade = registerFragmentFacade;
this.additionalFragments = additionalFragments;
this.configSource = new AnnotationRepositoryConfigurationSource(AnnotationMetadata.introspect(configClass),
EnableJpaRepositories.class, new DefaultResourceLoader(), new StandardEnvironment(),
Mockito.mock(BeanDefinitionRegistry.class), DefaultBeanNameGenerator.INSTANCE);
}
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
TestGenerationContext generationContext = new TestGenerationContext(repositoryInterface);
RepositoryComposition composition = RepositoryComposition
.of((List) Arrays.stream(additionalFragments).map(RepositoryFragment::structural).toList());
repositoryContext.setBeanFactory(beanFactory);
TestJpaAotRepositoryContext<?> repositoryContext = new TestJpaAotRepositoryContext<>(beanFactory,
repositoryInterface, composition, configSource);
new JpaRepositoryContributor(repositoryContext).contribute(generationContext);

69
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/aot/TestJpaAotRepositoryContext.java

@ -19,24 +19,20 @@ import jakarta.persistence.Entity; @@ -19,24 +19,20 @@ import jakarta.persistence.Entity;
import jakarta.persistence.MappedSuperclass;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.core.annotation.MergedAnnotation;
import org.springframework.core.env.Environment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.data.aot.AotTypeConfiguration;
import org.springframework.data.aot.AotContext;
import org.springframework.data.jpa.domain.sample.Role;
import org.springframework.data.jpa.domain.sample.SpecialUser;
import org.springframework.data.jpa.domain.sample.User;
import org.springframework.data.jpa.repository.support.JpaRepositoryFragmentsContributor;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import org.springframework.data.repository.config.AotRepositoryContext;
import org.springframework.data.repository.config.AotRepositoryContextSupport;
import org.springframework.data.repository.config.AotRepositoryInformation;
import org.springframework.data.repository.config.RepositoryConfigurationSource;
import org.springframework.data.repository.core.RepositoryInformation;
@ -49,15 +45,16 @@ import org.springframework.data.repository.core.support.RepositoryComposition; @@ -49,15 +45,16 @@ import org.springframework.data.repository.core.support.RepositoryComposition;
*
* @author Christoph Strobl
*/
public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext {
public class TestJpaAotRepositoryContext<T> extends AotRepositoryContextSupport {
private final AotRepositoryInformation repositoryInformation;
private final Class<T> repositoryInterface;
private final RepositoryConfigurationSource configurationSource;
private @Nullable ConfigurableListableBeanFactory beanFactory;
public TestJpaAotRepositoryContext(Class<T> repositoryInterface, @Nullable RepositoryComposition composition,
public TestJpaAotRepositoryContext(BeanFactory beanFactory, Class<T> repositoryInterface,
@Nullable RepositoryComposition composition,
RepositoryConfigurationSource configurationSource) {
super(AotContext.from(beanFactory));
this.repositoryInterface = repositoryInterface;
this.configurationSource = configurationSource;
@ -69,45 +66,6 @@ public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext { @@ -69,45 +66,6 @@ public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext {
composition.append(fragments).getFragments().stream().toList());
}
public Class<T> getRepositoryInterface() {
return repositoryInterface;
}
@Override
public ConfigurableListableBeanFactory getBeanFactory() {
return beanFactory;
}
@Override
public Environment getEnvironment() {
return new StandardEnvironment();
}
@Override
public TypeIntrospector introspectType(String typeName) {
return null;
}
@Override
public IntrospectedBeanDefinition introspectBeanDefinition(String beanName) {
return null;
}
@Override
public void typeConfiguration(Class<?> type, Consumer<AotTypeConfiguration> configurationConsumer) {
}
@Override
public Collection<AotTypeConfiguration> typeConfigurations() {
return List.of();
}
@Override
public String getBeanName() {
return "dummyRepository";
}
@Override
public String getModuleName() {
return "JPA";
@ -118,11 +76,6 @@ public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext { @@ -118,11 +76,6 @@ public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext {
return configurationSource;
}
@Override
public Set<String> getBasePackages() {
return Set.of("org.springframework.data.dummy.repository.aot");
}
@Override
public Set<Class<? extends Annotation>> getIdentifyingAnnotations() {
return Set.of(Entity.class, MappedSuperclass.class);
@ -143,12 +96,4 @@ public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext { @@ -143,12 +96,4 @@ public class TestJpaAotRepositoryContext<T> implements AotRepositoryContext {
return Set.of(User.class, SpecialUser.class, Role.class);
}
@Override
public Set<Class<?>> getUserDomainTypes() {
return Set.of();
}
public void setBeanFactory(ConfigurableListableBeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
}

77
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/JpaRepositoryRegistrationAotProcessorUnitTests.java

@ -23,13 +23,12 @@ import jakarta.persistence.Id; @@ -23,13 +23,12 @@ import jakarta.persistence.Id;
import java.lang.annotation.Annotation;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junitpioneer.jupiter.ClearSystemProperty;
import org.junitpioneer.jupiter.SetSystemProperty;
@ -47,17 +46,15 @@ import org.springframework.core.annotation.MergedAnnotation; @@ -47,17 +46,15 @@ import org.springframework.core.annotation.MergedAnnotation;
import org.springframework.core.env.Environment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.data.aot.AotContext;
import org.springframework.data.aot.AotTypeConfiguration;
import org.springframework.data.jpa.repository.aot.JpaRepositoryContributor;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.config.AotRepositoryContext;
import org.springframework.data.repository.config.AotRepositoryContextSupport;
import org.springframework.data.repository.config.AotRepositoryInformation;
import org.springframework.data.repository.config.RepositoryConfigurationSource;
import org.springframework.data.repository.core.RepositoryInformation;
import org.springframework.data.repository.core.support.AbstractRepositoryMetadata;
import org.springframework.javapoet.ClassName;
import org.springframework.mock.env.MockPropertySource;
import org.springframework.orm.jpa.persistenceunit.PersistenceManagedTypes;
/**
@ -70,13 +67,14 @@ import org.springframework.orm.jpa.persistenceunit.PersistenceManagedTypes; @@ -70,13 +67,14 @@ import org.springframework.orm.jpa.persistenceunit.PersistenceManagedTypes;
class JpaRepositoryRegistrationAotProcessorUnitTests {
@Test // GH-2628
@Disabled("TODO: Superfluous contributeType in Commons")
void aotProcessorMustNotRegisterDomainTypes() {
GenerationContext ctx = createGenerationContext();
GenericApplicationContext context = new GenericApplicationContext();
new JpaRepositoryConfigExtension.JpaRepositoryRegistrationAotProcessor()
.contribute(new DummyAotRepositoryContext(context) {
.configureTypeContributions(new DummyAotRepositoryContext(context) {
@Override
public Set<Class<?>> getResolvedTypes() {
return Collections.singleton(Person.class);
@ -93,7 +91,7 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -93,7 +91,7 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
GenericApplicationContext context = new GenericApplicationContext();
new JpaRepositoryConfigExtension.JpaRepositoryRegistrationAotProcessor()
.contribute(new DummyAotRepositoryContext(context) {
.configureTypeContributions(new DummyAotRepositoryContext(context) {
@Override
public Set<MergedAnnotation<Annotation>> getResolvedAnnotations() {
@ -109,8 +107,6 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -109,8 +107,6 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
@Test // GH-3838
void repositoryProcessorShouldConsiderPersistenceManagedTypes() {
GenerationContext ctx = createGenerationContext();
GenericApplicationContext context = new GenericApplicationContext();
context.registerBean(PersistenceManagedTypes.class, () -> {
@ -132,11 +128,8 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -132,11 +128,8 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
};
});
context.getEnvironment().getPropertySources()
.addFirst(new MockPropertySource().withProperty(AotContext.GENERATED_REPOSITORIES_ENABLED, "true"));
JpaRepositoryContributor contributor = new JpaRepositoryConfigExtension.JpaRepositoryRegistrationAotProcessor()
.contribute(new DummyAotRepositoryContext(context), ctx);
.contributeAotRepository(new DummyAotRepositoryContext(context));
assertThat(contributor.getMetamodel().managedType(Person.class)).isNotNull();
}
@ -145,10 +138,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -145,10 +138,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
@SetSystemProperty(key = AotDetector.AOT_ENABLED, value = "true")
void repositoryProcessorShouldEnableAotRepositoriesByDefaultWhenAotIsEnabled() {
GenerationContext ctx = createGenerationContext();
GenericApplicationContext context = new GenericApplicationContext();
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context, ctx);
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context);
assertThat(contributor).isNotNull();
}
@ -157,10 +149,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -157,10 +149,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
@ClearSystemProperty(key = AotContext.GENERATED_REPOSITORIES_ENABLED)
void shouldEnableAotRepositoriesByDefault() {
GenerationContext ctx = createGenerationContext();
GenericApplicationContext context = new GenericApplicationContext();
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context, ctx);
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context);
assertThat(contributor).isNotNull();
}
@ -169,10 +160,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -169,10 +160,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
@SetSystemProperty(key = AotContext.GENERATED_REPOSITORIES_ENABLED, value = "false")
void shouldDisableAotRepositoriesWhenGeneratedRepositoriesIsFalse() {
GenerationContext ctx = createGenerationContext();
GenericApplicationContext context = new GenericApplicationContext();
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context, ctx);
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context);
assertThat(contributor).isNull();
}
@ -181,10 +171,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -181,10 +171,9 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
@SetSystemProperty(key = "spring.aot.jpa.repositories.enabled", value = "false")
void shouldDisableAotRepositoriesWhenJpaGeneratedRepositoriesIsFalse() {
GenerationContext ctx = createGenerationContext();
GenericApplicationContext context = new GenericApplicationContext();
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context, ctx);
JpaRepositoryContributor contributor = createContributorWithPersonTypes(context);
assertThat(contributor).isNull();
}
@ -194,15 +183,15 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -194,15 +183,15 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
new InMemoryGeneratedFiles());
}
private JpaRepositoryContributor createContributorWithPersonTypes(GenericApplicationContext context, GenerationContext ctx) {
private JpaRepositoryContributor createContributorWithPersonTypes(GenericApplicationContext context) {
return new JpaRepositoryConfigExtension.JpaRepositoryRegistrationAotProcessor()
.contribute(new DummyAotRepositoryContext(context) {
.contributeAotRepository(new DummyAotRepositoryContext(context) {
@Override
public Set<Class<?>> getResolvedTypes() {
return Collections.singleton(Person.class);
}
}, ctx);
});
}
@Entity
@ -212,19 +201,15 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -212,19 +201,15 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
interface PersonRepository extends Repository<Person, Long> {}
static class DummyAotRepositoryContext implements AotRepositoryContext {
static class DummyAotRepositoryContext extends AotRepositoryContextSupport {
private final @Nullable AbstractApplicationContext applicationContext;
private final AbstractApplicationContext applicationContext;
DummyAotRepositoryContext(@Nullable AbstractApplicationContext applicationContext) {
DummyAotRepositoryContext(AbstractApplicationContext applicationContext) {
super(AotContext.from(applicationContext, applicationContext.getEnvironment()));
this.applicationContext = applicationContext;
}
@Override
public String getBeanName() {
return "jpaRepository";
}
@Override
public String getModuleName() {
return "JPA";
@ -235,11 +220,6 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -235,11 +220,6 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
return mock(RepositoryConfigurationSource.class);
}
@Override
public Set<String> getBasePackages() {
return Collections.singleton(this.getClass().getPackageName());
}
@Override
public Set<Class<? extends Annotation>> getIdentifyingAnnotations() {
return Collections.singleton(Entity.class);
@ -261,11 +241,6 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -261,11 +241,6 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
return Set.of();
}
@Override
public Set<Class<?>> getUserDomainTypes() {
return Set.of();
}
@Override
public ConfigurableListableBeanFactory getBeanFactory() {
return applicationContext != null ? applicationContext.getBeanFactory() : null;
@ -276,25 +251,7 @@ class JpaRepositoryRegistrationAotProcessorUnitTests { @@ -276,25 +251,7 @@ class JpaRepositoryRegistrationAotProcessorUnitTests {
return applicationContext == null ? new StandardEnvironment() : applicationContext.getEnvironment();
}
@Override
public TypeIntrospector introspectType(String typeName) {
return null;
}
@Override
public IntrospectedBeanDefinition introspectBeanDefinition(String beanName) {
return null;
}
@Override
public void typeConfiguration(Class<?> type, Consumer<AotTypeConfiguration> configurationConsumer) {
}
@Override
public Collection<AotTypeConfiguration> typeConfigurations() {
return List.of();
}
}
}

Loading…
Cancel
Save