Affects: 6.1
We have a few places in Spring Boot where we need to detect if AOT processing is in progress. https://github.com/spring-projects/spring-boot/issues/41838 is another case. At the moment, detection relies upon checking the spring.aot.processing
system property that's set by AbstractAotProcessor
. The property's name is private so we're depending on what's otherwise an implementation detail of Framework which doesn't feel great.
Given that we already have a need for this detection and it appears to be growing, it would be good to have an "official" way to do it. Perhaps the constant that defines the property's name could be made public or, going a step further, perhaps a method could be added to AotDetector
?
Comment From: jhoeller
Let's make AbstractAotProcessor.AOT_PROCESSING
public for 6.2 RC2.