- 
                Notifications
    
You must be signed in to change notification settings  - Fork 41.6k
 
Closed
Closed
Copy link
Description
The release notes of Spring Boot 3.5.7 mentions within #47311 that Spring Boot supports package-private main methods, which is true.
But unfortunately, when using the process-aot goal of the spring-boot-maven-plugin the following exception occurs:
13907 [INFO] --- spring-boot:3.5.7:process-aot (process-aot) @ XXX ---
Exception in thread "main" java.lang.RuntimeException: xxx.Application.main([Ljava.lang.String;)
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:64)
	at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
	at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1461)
	at org.springframework.boot.SpringApplicationAotProcessor$AotProcessorHook.run(SpringApplicationAotProcessor.java:109)
	at org.springframework.boot.SpringApplicationAotProcessor.prepareApplicationContext(SpringApplicationAotProcessor.java:60)
	at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:83)
	at org.springframework.context.aot.ContextAotProcessor.doProcess(ContextAotProcessor.java:49)
	at org.springframework.context.aot.AbstractAotProcessor.process(AbstractAotProcessor.java:83)
	at org.springframework.boot.SpringApplicationAotProcessor.main(SpringApplicationAotProcessor.java:80)
Caused by: java.lang.NoSuchMethodException: xxx.Application.main([Ljava.lang.String;)
	at java.base/java.lang.Class.getMethod(Class.java:2166)
	at org.springframework.boot.SpringApplicationAotProcessor.lambda$prepareApplicationContext$0(SpringApplicationAotProcessor.java:61)
Because the launcher and the build of the executable jar works It would be nice to add aot support, too.
Thanks.
sleicht, rajadilipkolli and burl21
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug