如有疑问?请联系我
最后更新时间:2023/08/15
sql 文件在 doc/db/open_job.sql
@EnableSecurity
@EnableScheduling
@EnableOpenRpcClient
@SpringBootApplication
public class JobDashboardApplication {
public static void main(String[] args) {
SpringApplication.run(JobDashboardApplication.class, args);
}
}
@EnableOpenRpcServer
@SpringBootApplication
public class JobClientApplication {
public static void main(String[] args) {
SpringApplication.run(JobClientApplication.class, args);
}
}
git clone https://github.com/lijunping365/Open-Job-Admin.git
npm install
npm start
示例 1
@Slf4j
@JobHandler(name = "job-one")
@Component
public class OpenJobHandlerOne implements OpenJobHandler {
@Override
public void handler(JobParam jobParam) {
log.info("JobHandlerOne 处理任务");
}
}
示例 2
@Slf4j
@Component
public class OpenJobHandlerMethodOne{
@JobHandler(name = "job-method-one1")
public void handlerOne1(JobParam jobParam) {
log.info("JobHandlerOne 处理任务, 任务参数 {}", jobParam.getParams());
}
@JobHandler(name = "job-method-one2")
public void handlerOne2(JobParam jobParam) {
log.info("JobHandlerOne 处理任务, 任务参数 {}", jobParam.getParams());
}
}
如有疑问?请联系我
最后更新时间:2023/08/15