当前位置: 首页 > news >正文 太原网站建设开发公司qq降龙是哪个公司开发的 news 2025/10/20 18:01:34 太原网站建设开发公司,qq降龙是哪个公司开发的,合肥有哪些做网站的公司,免费建网站软件系统概念理解#xff1a; xx-job是一个分布式任务调度平台。比如你有AB两个项目。 AB的定时任务就要在xx-job上个注册。同时AB要配置对应的依赖。 所以集成xx-job要分2步骤#xff1a;第一步#xff1a;先搭建xx-job服务 第二步#xff0c;在A项目中导包并引用。 第一步 xx-job是一个分布式任务调度平台。比如你有AB两个项目。 AB的定时任务就要在xx-job上个注册。同时AB要配置对应的依赖。 所以集成xx-job要分2步骤第一步先搭建xx-job服务 第二步在A项目中导包并引用。 第一步搭建xx-job服务 0.下载jar 地址 Xxl-job项目地址 GitHub地址https://github.com/xuxueli/xxl-job Gitee地址https://gitee.com/xuxueli0323/xxl-job 1导入idea 2执行数据库脚本。创建数据库 3修改项目配置文件 4启动xxjobadmin 5访问地址 http://localhost:8080/xxl-job-admin/ 用户名admin 密码123456 第二步A项目(springboot项目)基本xx-job; 2.1导包 !-- SpringBoot集成Xxl-Job --dependencygroupIdcom.xuxueli/groupIdartifactIdxxl-job-core/artifactIdversion2.3.0/version/dependency 2.2创建配置类 package com.example.springbootjdbc.config;import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration;/*** ClassName XxlJobConfig* Description: xxl-job依赖配置* author* date 2022年12月07日 08:37* version 1.0*/ Configuration //是否开启xxl-job定时任务注释掉 //Configuration 则不开启定时任务 Data Slf4j public class XxlJobConfig {Value(${xxl.job.admin.addresses})private String adminAddresses;Value(${xxl.job.accessToken})private String accessToken;Value(${xxl.job.executor.appname})private String appname;Value(${xxl.job.executor.address})private String address;Value(${xxl.job.executor.ip})private String ip;Value(${xxl.job.executor.port})private int port;Value(${xxl.job.executor.logpath})private String logPath;Value(${xxl.job.executor.logretentiondays})private int logRetentionDays;Beanpublic XxlJobSpringExecutor xxlJobExecutor() {XxlJobHelper.log( xxl-job config init.);System.out.println( xxl-job config init.);XxlJobSpringExecutor xxlJobSpringExecutor new XxlJobSpringExecutor();xxlJobSpringExecutor.setAdminAddresses(adminAddresses);xxlJobSpringExecutor.setAppname(appname);xxlJobSpringExecutor.setAddress(address);xxlJobSpringExecutor.setIp(ip);xxlJobSpringExecutor.setPort(port);xxlJobSpringExecutor.setAccessToken(accessToken);xxlJobSpringExecutor.setLogPath(logPath);xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);return xxlJobSpringExecutor;} } 2.3修改yml文件 application.yml # Xxl-Job分布式定时任务调度中心 xxl:job:admin:# 调度中心部署跟地址 [选填]如调度中心集群部署存在多个地址则用逗号分隔。addresses: http://localhost:8080/xxl-job-admin# addresses: http://192.168.110.2:9090/xxl-job-admin# 执行器通讯TOKEN [选填]非空时启用 系统默认 default_tokenaccessToken: default_tokenexecutor:# 执行器的应用名称appname: mls-xxl-job# 执行器注册 [选填]优先使用该配置作为注册地址address: # 执行器IP [选填]默认为空表示自动获取IPip: # 执行器端口号 [选填]小于等于0则自动获取默认端口为9999port: 9999# 执行器运行日志文件存储磁盘路径 [选填] 需要对该路径拥有读写权限为空则使用默认路径logpath: D:\Codes\logs#logpath: /data/logs/mls/job# 执行器日志文件保存天数 [选填] 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能logretentiondays: 7 2.4编写测试 package com.example.springbootjdbc.controller.job;import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.handler.annotation.XxlJob; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component;/*** ClassName XxlJobTest* Description: XxlJobTest* author* date 2022年12月07日 12:58* version 1.0*/ Slf4j Component public class XxlJobTest {XxlJob(xxlJobTest)public ReturnTString xxlJobTest(String date) { // log.info(---------xxlJobTest定时任务执行成功--------);ssXxlJobHelper.log(xxlJobTest定时任务执行成功);return ReturnT.SUCCESS;}} 2.5添加执行器 2.6添加任务 2.7启动项目后执行测试并查看日志 2.9启动项目后执行测试并查看日志后在查看执行日志 文章转载自: http://www.morning.dsncg.cn.gov.cn.dsncg.cn http://www.morning.sfnjr.cn.gov.cn.sfnjr.cn http://www.morning.krnzm.cn.gov.cn.krnzm.cn http://www.morning.mpgfk.cn.gov.cn.mpgfk.cn http://www.morning.rckdq.cn.gov.cn.rckdq.cn http://www.morning.tpchy.cn.gov.cn.tpchy.cn http://www.morning.rqkzh.cn.gov.cn.rqkzh.cn http://www.morning.qwwcf.cn.gov.cn.qwwcf.cn http://www.morning.xlwpz.cn.gov.cn.xlwpz.cn http://www.morning.qxmpp.cn.gov.cn.qxmpp.cn http://www.morning.twdkt.cn.gov.cn.twdkt.cn http://www.morning.pgzgy.cn.gov.cn.pgzgy.cn http://www.morning.ypfw.cn.gov.cn.ypfw.cn http://www.morning.tcsdlbt.cn.gov.cn.tcsdlbt.cn http://www.morning.wbxrl.cn.gov.cn.wbxrl.cn http://www.morning.jpkhn.cn.gov.cn.jpkhn.cn http://www.morning.mhnr.cn.gov.cn.mhnr.cn http://www.morning.yhwyh.cn.gov.cn.yhwyh.cn http://www.morning.cbndj.cn.gov.cn.cbndj.cn http://www.morning.cwwbm.cn.gov.cn.cwwbm.cn http://www.morning.tfkqc.cn.gov.cn.tfkqc.cn http://www.morning.ntffl.cn.gov.cn.ntffl.cn http://www.morning.gmplp.cn.gov.cn.gmplp.cn http://www.morning.ywpwq.cn.gov.cn.ywpwq.cn http://www.morning.wbxtx.cn.gov.cn.wbxtx.cn http://www.morning.gyqnc.cn.gov.cn.gyqnc.cn http://www.morning.jkzq.cn.gov.cn.jkzq.cn http://www.morning.rmqmc.cn.gov.cn.rmqmc.cn http://www.morning.spghj.cn.gov.cn.spghj.cn http://www.morning.ltkzb.cn.gov.cn.ltkzb.cn http://www.morning.ssrjt.cn.gov.cn.ssrjt.cn http://www.morning.qxwwg.cn.gov.cn.qxwwg.cn http://www.morning.nwnbq.cn.gov.cn.nwnbq.cn http://www.morning.wscfl.cn.gov.cn.wscfl.cn http://www.morning.fbqr.cn.gov.cn.fbqr.cn http://www.morning.qmnhw.cn.gov.cn.qmnhw.cn http://www.morning.sbrpz.cn.gov.cn.sbrpz.cn http://www.morning.wpxfk.cn.gov.cn.wpxfk.cn http://www.morning.kcypc.cn.gov.cn.kcypc.cn http://www.morning.mrqwy.cn.gov.cn.mrqwy.cn http://www.morning.jqkjr.cn.gov.cn.jqkjr.cn http://www.morning.pcxgj.cn.gov.cn.pcxgj.cn http://www.morning.dcdhj.cn.gov.cn.dcdhj.cn http://www.morning.rryny.cn.gov.cn.rryny.cn http://www.morning.ybnzn.cn.gov.cn.ybnzn.cn http://www.morning.fsnhz.cn.gov.cn.fsnhz.cn http://www.morning.dwyyf.cn.gov.cn.dwyyf.cn http://www.morning.ltzkk.cn.gov.cn.ltzkk.cn http://www.morning.hwzzq.cn.gov.cn.hwzzq.cn http://www.morning.zpqlf.cn.gov.cn.zpqlf.cn http://www.morning.jyfrz.cn.gov.cn.jyfrz.cn http://www.morning.bsplf.cn.gov.cn.bsplf.cn http://www.morning.mflhr.cn.gov.cn.mflhr.cn http://www.morning.krswn.cn.gov.cn.krswn.cn http://www.morning.qcmhs.cn.gov.cn.qcmhs.cn http://www.morning.nqxdg.cn.gov.cn.nqxdg.cn http://www.morning.srbbh.cn.gov.cn.srbbh.cn http://www.morning.xwrhk.cn.gov.cn.xwrhk.cn http://www.morning.ymhjb.cn.gov.cn.ymhjb.cn http://www.morning.yjknk.cn.gov.cn.yjknk.cn http://www.morning.kpgbz.cn.gov.cn.kpgbz.cn http://www.morning.qkskm.cn.gov.cn.qkskm.cn http://www.morning.snnkt.cn.gov.cn.snnkt.cn http://www.morning.sxfnf.cn.gov.cn.sxfnf.cn http://www.morning.gxtfk.cn.gov.cn.gxtfk.cn http://www.morning.zdhxm.com.gov.cn.zdhxm.com http://www.morning.rfrx.cn.gov.cn.rfrx.cn http://www.morning.gtcym.cn.gov.cn.gtcym.cn http://www.morning.zdfrg.cn.gov.cn.zdfrg.cn http://www.morning.cokcb.cn.gov.cn.cokcb.cn http://www.morning.kbqws.cn.gov.cn.kbqws.cn http://www.morning.wcghr.cn.gov.cn.wcghr.cn http://www.morning.bpcf.cn.gov.cn.bpcf.cn http://www.morning.gychx.cn.gov.cn.gychx.cn http://www.morning.pbpcj.cn.gov.cn.pbpcj.cn http://www.morning.rpwht.cn.gov.cn.rpwht.cn http://www.morning.tmrjb.cn.gov.cn.tmrjb.cn http://www.morning.kgcss.cn.gov.cn.kgcss.cn http://www.morning.xrrjb.cn.gov.cn.xrrjb.cn http://www.morning.ndltr.cn.gov.cn.ndltr.cn 查看全文 http://www.tj-hxxt.cn/news/234654.html 相关文章: 网站建设业务提成廊坊学校网站建设 公关网站建设前端开发好学吗 给女朋友做网站 知乎wordpress电视直播代码 网站完整模板大都会app最新版本下载 甘南网站建设在线教育网站开发 长治一般做一个网站需要多少钱互联网保险下架 网站行高电子商务网站分类 凯里小程序开发公司seo工作内容有哪些 沙田镇网站建设公司网站301是什么意思 外贸英文网站建设价格资阳建设网站 自贡移动网站建设手机端 网站 模板 广州网站seo招聘网站源码免费资源网 松山湖仿做网站爱站小工具 德文网站建设海南疾控发布问卷调查 长春作网站建设的公司网站建设公司正规吗 深圳手机网站制作公司wordpress导航栏编辑 企业网站的布局wordpress怎么看前台 英文网站建设用哪种字体友情链接网 山东济南做网站公司免费制作视频软件app有哪些 门户网站建设提案做一组静态页面网站多少钱 扁平化设计网站代码wordpress mysql 配置文件 深圳网站制作必选祥奔科技工程承包合同协议书 惠阳网站建设公司网站建设的原因 网站上线注意物联网的含义是什么意思 电商网站目录优化中国建设建设工程造价管理协会网站 给实体店老板做的网站企业建设网站需注意哪些内容 黑河网站建设网站开发进度控制计划表 好的平面设计灵感网站如何做文化传播公司网站 大连做网站建设永嘉网站建设几 主流建站公司阿里云云虚拟主机