Use AbstractAotProcessor.AOT_PROCESSING instead of duplicate constant
Closes gh-42461
This commit is contained in:
@@ -36,6 +36,7 @@ import org.springframework.boot.docker.compose.lifecycle.DockerComposeProperties
|
||||
import org.springframework.boot.docker.compose.lifecycle.DockerComposeProperties.Stop;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.aot.AbstractAotProcessor;
|
||||
import org.springframework.context.event.SimpleApplicationEventMulticaster;
|
||||
import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -95,7 +96,7 @@ class DockerComposeLifecycleManager {
|
||||
}
|
||||
|
||||
void start() {
|
||||
if (Boolean.getBoolean("spring.aot.processing") || AotDetector.useGeneratedArtifacts()) {
|
||||
if (Boolean.getBoolean(AbstractAotProcessor.AOT_PROCESSING) || AotDetector.useGeneratedArtifacts()) {
|
||||
logger.trace("Docker Compose support disabled with AOT and native images");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.boot.test.system.CapturedOutput;
|
||||
import org.springframework.boot.test.system.OutputCaptureExtension;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.aot.AbstractAotProcessor;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
|
||||
@@ -126,7 +127,7 @@ class DockerComposeLifecycleManagerTests {
|
||||
|
||||
@Test
|
||||
void startWhenAotProcessingDoesNotStart() {
|
||||
withSystemProperty("spring.aot.processing", "true", () -> {
|
||||
withSystemProperty(AbstractAotProcessor.AOT_PROCESSING, "true", () -> {
|
||||
EventCapturingListener listener = new EventCapturingListener();
|
||||
this.eventListeners.add(listener);
|
||||
setUpRunningServices();
|
||||
|
||||
Reference in New Issue
Block a user