|
|
|
@ -17,8 +17,10 @@ package org.springframework.data.mongodb.repository.aot; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.lang.annotation.Annotation; |
|
|
|
import java.lang.annotation.Annotation; |
|
|
|
|
|
|
|
import java.util.Collection; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Set; |
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
import java.util.function.Consumer; |
|
|
|
|
|
|
|
|
|
|
|
import org.jspecify.annotations.Nullable; |
|
|
|
import org.jspecify.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
|
|
@ -28,6 +30,7 @@ import org.springframework.core.env.Environment; |
|
|
|
import org.springframework.core.env.StandardEnvironment; |
|
|
|
import org.springframework.core.env.StandardEnvironment; |
|
|
|
import org.springframework.core.io.ClassPathResource; |
|
|
|
import org.springframework.core.io.ClassPathResource; |
|
|
|
import org.springframework.core.test.tools.ClassFile; |
|
|
|
import org.springframework.core.test.tools.ClassFile; |
|
|
|
|
|
|
|
import org.springframework.data.aot.AotTypeConfiguration; |
|
|
|
import org.springframework.data.mongodb.core.mapping.Document; |
|
|
|
import org.springframework.data.mongodb.core.mapping.Document; |
|
|
|
import org.springframework.data.mongodb.repository.support.MongoRepositoryFragmentsContributor; |
|
|
|
import org.springframework.data.mongodb.repository.support.MongoRepositoryFragmentsContributor; |
|
|
|
import org.springframework.data.mongodb.repository.support.SimpleMongoRepository; |
|
|
|
import org.springframework.data.mongodb.repository.support.SimpleMongoRepository; |
|
|
|
@ -77,6 +80,16 @@ public class TestMongoAotRepositoryContext implements AotRepositoryContext { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void typeConfiguration(Class<?> type, Consumer<AotTypeConfiguration> configurationConsumer) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Collection<AotTypeConfiguration> typeConfigurations() { |
|
|
|
|
|
|
|
return List.of(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String getBeanName() { |
|
|
|
public String getBeanName() { |
|
|
|
return "dummyRepository"; |
|
|
|
return "dummyRepository"; |
|
|
|
@ -117,6 +130,11 @@ public class TestMongoAotRepositoryContext implements AotRepositoryContext { |
|
|
|
return Set.of(); |
|
|
|
return Set.of(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Set<Class<?>> getUserDomainTypes() { |
|
|
|
|
|
|
|
return Set.of(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<ClassFile> getRequiredContextFiles() { |
|
|
|
public List<ClassFile> getRequiredContextFiles() { |
|
|
|
return List.of(classFileForType(repositoryInformation.getRepositoryBaseClass())); |
|
|
|
return List.of(classFileForType(repositoryInformation.getRepositoryBaseClass())); |
|
|
|
} |
|
|
|
} |
|
|
|
|