From 50f5a50c33e0c5219c42c9a3b630c488237b6d2c Mon Sep 17 00:00:00 2001 From: gmunozfe Date: Wed, 13 Dec 2023 16:14:34 +0100 Subject: [PATCH 1/2] [JBPM-10214] Fix regression for immutable KIE container with auto scan --- .../autoconfiguration/KieServerAutoConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java b/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java index 4639b71fd3..5f790b68c3 100644 --- a/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java +++ b/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java @@ -173,7 +173,8 @@ public List buildDeployments(KieServerProperties kieServer public List buildAutoScanDeployments(KieServerProperties kieServerProperties) throws IOException { ApplicationHome appHome = new ApplicationHome(); final String folder = "BOOT-INF/classes/KIE-INF/lib/"; - return (explodedJarFolder == null) ? discoverDeployments(folder, new FileInputStream(appHome.getSource())) : discoverDeployments(folder, new File(explodedJarFolder)); + List containerResources = discoverDeployments(folder, new File(explodedJarFolder)); + return (containerResources.isEmpty()) ? discoverDeployments(folder, new FileInputStream(appHome.getSource())) : containerResources; } public List discoverDeployments(String folder, File root) { From f00036a078bf60b74f95c2ce28d1ea9af39e2a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Mu=C3=B1oz?= Date: Fri, 15 Dec 2023 11:39:46 +0100 Subject: [PATCH 2/2] Update kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java Co-authored-by: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> --- .../autoconfiguration/KieServerAutoConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java b/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java index 5f790b68c3..2eb1b5f91e 100644 --- a/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java +++ b/kie-spring-boot/kie-spring-boot-autoconfiguration/kie-server-spring-boot-autoconfiguration/src/main/java/org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.java @@ -174,7 +174,7 @@ public List buildAutoScanDeployments(KieServerProperties k ApplicationHome appHome = new ApplicationHome(); final String folder = "BOOT-INF/classes/KIE-INF/lib/"; List containerResources = discoverDeployments(folder, new File(explodedJarFolder)); - return (containerResources.isEmpty()) ? discoverDeployments(folder, new FileInputStream(appHome.getSource())) : containerResources; + return containerResources.isEmpty() ? discoverDeployments(folder, new FileInputStream(appHome.getSource())) : containerResources; } public List discoverDeployments(String folder, File root) {