Skip to content

Commit

Permalink
lookup trigger name
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Dec 9, 2024
1 parent 262f31b commit d3b3436
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ public void setApplicationContext(ApplicationContext applicationContext) {
Collection<Task> 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
Expand Down

0 comments on commit d3b3436

Please sign in to comment.