From d3b3436041338444bfaad02fdf64994f38363a94 Mon Sep 17 00:00:00 2001 From: car031 Date: Mon, 9 Dec 2024 17:47:50 +0100 Subject: [PATCH] lookup trigger name --- .../com/logicaldoc/core/task/DefaultSchedulerFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logicaldoc-core/src/main/java/com/logicaldoc/core/task/DefaultSchedulerFactory.java b/logicaldoc-core/src/main/java/com/logicaldoc/core/task/DefaultSchedulerFactory.java index f188c589b..278f6a0cf 100644 --- a/logicaldoc-core/src/main/java/com/logicaldoc/core/task/DefaultSchedulerFactory.java +++ b/logicaldoc-core/src/main/java/com/logicaldoc/core/task/DefaultSchedulerFactory.java @@ -75,7 +75,11 @@ public void setApplicationContext(ApplicationContext applicationContext) { Collection tasks = manager.getTasks(applicationContext); for (Task task : tasks) { String name = task.getName(); - Object trigger = applicationContext.getBean(name + "Trigger"); + String triggerName = name + "Trigger"; + Object trigger = applicationContext.getBean(triggerName); + if (trigger == null) + trigger = applicationContext + .getBean(Character.toLowerCase(triggerName.charAt(0)) + triggerName.substring(1)); if (trigger instanceof Trigger trgr) { triggers.add(trgr); } else