fix: support pre-3.2 Spring Boot JARs in runtime entrypoint
RuntimeDetector now derives the correct PropertiesLauncher FQN from the JAR manifest Main-Class package. Spring Boot 3.2+ uses org.springframework.boot.loader.launch.PropertiesLauncher, pre-3.2 uses org.springframework.boot.loader.PropertiesLauncher. DockerRuntimeOrchestrator uses the detected class instead of a hardcoded 3.2+ reference, falling back to 3.2+ when not auto-detected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -121,9 +121,12 @@ public class DockerRuntimeOrchestrator implements RuntimeOrchestrator {
|
||||
case "plain-java" -> "exec java -javaagent:/app/agent.jar -cp " + appJarPath +
|
||||
":/app/cameleer-log-appender.jar" + customArgs + " " + request.mainClass();
|
||||
case "native" -> "exec " + appJarPath + customArgs;
|
||||
default -> // spring-boot (default)
|
||||
"exec java -javaagent:/app/agent.jar -Dloader.path=/app/cameleer-log-appender.jar" +
|
||||
customArgs + " -cp " + appJarPath + " org.springframework.boot.loader.launch.PropertiesLauncher";
|
||||
default -> { // spring-boot (default)
|
||||
String launcher = request.mainClass() != null ? request.mainClass()
|
||||
: "org.springframework.boot.loader.launch.PropertiesLauncher";
|
||||
yield "exec java -javaagent:/app/agent.jar -Dloader.path=/app/cameleer-log-appender.jar" +
|
||||
customArgs + " -cp " + appJarPath + " " + launcher;
|
||||
}
|
||||
};
|
||||
createCmd.withEntrypoint("sh", "-c", entrypoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user