Scheduled params = task.getAnnotation(Scheduled.class);
return !params.id().isEmpty() ? params.id() : task.getSimpleName();
}
private String getId(Class<?> controller, Method method) {
Scheduled params = method.getAnnotation(Scheduled.class);
if (!params.id().isEmpty())
return params.id();
else
return controller.getSimpleName() + "." + method.getName();
}