
笔记
你好?
这个作者很懒,什么都没留下…
展开
-
springboot中定时任务
springboot中定时任务 第一种: 是springboot中自带的循环,但是解决不了分布式下的定时任务 @Configuration @EnableScheduling //修饰范围用在类上 用来标识这个类是一个定时类 @Slf4j public class MyTask { @Scheduled(cron = "1/10 * * * * ? ")//修饰范围用在方法上,标识这个方法是一个定时任务方法 // cron 作用:用来决定当前的任务循环周期的 public voi原创 2021-03-16 11:51:55 · 168 阅读 · 0 评论 -
devtools热部署
springboot中的热部署 在pom依赖中加入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependenc原创 2021-03-16 10:24:29 · 142 阅读 · 0 评论