0
点赞
收藏
分享

微信扫一扫

JAVA - 项目启动后执行定时任务

倚然君 2022-04-20 阅读 75
java后端

项目启动后不执行定时任务??

这个得在启动类上加 @EnableScheduling 注解

@EnableScheduling
@SpringBootApplication
public class FristApplication {

    public static void main(String[] args) {
        SpringApplication.run(FristApplication.class, args);
    }

}
举报

相关推荐

0 条评论