Adapt to changes in DefaultGenerationContext
See https://github.com/spring-projects/spring-framework/issues/28877
This commit is contained in:
@@ -101,7 +101,7 @@ public class AotProcessor {
|
||||
/**
|
||||
* Trigger the processing of the application managed by this instance.
|
||||
*/
|
||||
public void process() {
|
||||
public void process() throws IOException {
|
||||
deleteExistingOutput();
|
||||
AotProcessorHook hook = new AotProcessorHook();
|
||||
SpringApplicationHooks.withHook(hook, this::callApplicationMainMethod);
|
||||
@@ -142,7 +142,7 @@ public class AotProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
private void performAotProcessing(GenericApplicationContext applicationContext) {
|
||||
private void performAotProcessing(GenericApplicationContext applicationContext) throws IOException {
|
||||
FileSystemGeneratedFiles generatedFiles = new FileSystemGeneratedFiles(this::getRoot);
|
||||
DefaultGenerationContext generationContext = new DefaultGenerationContext(
|
||||
new ClassNameGenerator(this.application), generatedFiles);
|
||||
|
||||
@@ -45,7 +45,7 @@ class AotProcessorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void processApplicationInvokesRunMethod(@TempDir Path directory) {
|
||||
void processApplicationInvokesRunMethod(@TempDir Path directory) throws IOException {
|
||||
String[] arguments = new String[] { "1", "2" };
|
||||
AotProcessor processor = new AotProcessor(SampleApplication.class, arguments, directory.resolve("source"),
|
||||
directory.resolve("resource"), directory.resolve("class"), "com.example", "example");
|
||||
|
||||
Reference in New Issue
Block a user