blob: 170f78007474a0af6f09a87db0a3a2cd5344cd41 [file] [log] [blame]
package org.eclipse.openk.contactbasedata.config;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
@Log4j2
@Configuration
@EnableScheduling
@ConditionalOnProperty(prefix = "ldap.scheduling", name="enabled", havingValue="true", matchIfMissing = false)
public class SchedulingConfig {
@Value("${ldap.scheduling.cron-expression}")
private String cronExpression;
@Bean
public void logConfig(){
log.info("Scheduler is enabled with cron expression: " + cronExpression);
}
}