@Component
@EnableScheduling
public class Scheduler {

    @Scheduled(fixedDelay = 100)
    public void getAccessToken() {
      
    }
}

少了@EnableScheduling
加上这个就好了
希望能交流更多技术,关注小白的微信公众号吧。
springboot中Scheduled不执行的原因

相关文章:

  • 2021-06-04
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-09-05
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案