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..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 @@ -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) {