内网开发
This commit is contained in:
@@ -3,7 +3,10 @@ package com.lld.im.service;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
|
||||
@EnableScheduling
|
||||
@SpringBootApplication(scanBasePackages = {"com.lld.im.service",
|
||||
"com.lld.im.common"})
|
||||
@MapperScan("com.lld.im.service.*.dao.mapper")
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.lld.im.service.taskScheduler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SRSStreamTask {
|
||||
@Scheduled(cron="0/5 * * * * ? ")
|
||||
public void executeTask(){
|
||||
String ip = System.getenv("SRS_HOST");
|
||||
|
||||
log.error("213132");
|
||||
log.info("========定时任务");
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
active: prod
|
||||
|
||||
Reference in New Issue
Block a user