Spring @Scheduled cron details from property file - Exception

前端 未结 2 1327
醉梦人生
醉梦人生 2020-12-20 02:27

I was trying to define the cron details in my spring @Scheduled method

@Service
@PropertySource(\"classpath:application.properties\")
public class CacheRefre         


        
2条回答
  •  情书的邮戳
    2020-12-20 02:59

    factoryBean.setCronExpression("0 0/1 * 1/1 * ? *"); 
    

    you have to set Cron Expresssion bcz in BeanFactory Class the setCronExpression is mandatory

提交回复
热议问题