java---定时任务@Scheduled注解报错:Encountered invalid @Scheduled method ‘xxx‘: For input string: ““

ssm框架,做定时任务,一直报这个错误
Encountered invalid @Scheduled method ‘setTimeAgain’: For input string: ""En

加上下边这个就Ok了

@Bean
    public TaskScheduler scheduledExecutorService() {
        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
        scheduler.setPoolSize(8);
        scheduler.setThreadNamePrefix("scheduled-thread-");
        
        return scheduler;
    }

你可能感兴趣的:(开发中遇到的问题)