当前位置: 首页 > news >正文

网站 工作室wordpress声明

网站 工作室,wordpress声明,专业做面膜的网站,网页素材图写在最前 如果这个项目让你有所收获#xff0c;记得 Star 关注哦#xff0c;这对我是非常不错的鼓励与支持。 源码地址#xff08;后端#xff09;#xff1a;mingyue: #x1f389; 基于 Spring Boot、Spring Cloud Alibaba 的分布式微服务架构基础服务中心 源…写在最前 如果这个项目让你有所收获记得 Star 关注哦这对我是非常不错的鼓励与支持。 源码地址后端mingyue: 基于 Spring Boot、Spring Cloud Alibaba 的分布式微服务架构基础服务中心 源码地址前端mingyue-ui: 基于 Vue3 TS Vite Element plus 等技术适配 MingYue 后台微服务 文档地址Wiki - Gitee.com 分布式任务调度框架 Java 常见的分布式任务调度框架主要是 Quartz 与 Xxl-Job还有一股新势力 PowerJob。这里简单介绍一下他们三个并横向对比一下。 Quartz 特点Quartz是一个功能强大的任务调度框架适用于定时任务、计划任务等。它支持多种触发器类型如SimpleTrigger和CronTrigger以及任务状态管理、监听器、集群部署等功能。 适用场景Quartz适合一般的任务调度需求特别是那些需要高度可配置性和定制性的场景。它在单机和小规模分布式环境中表现出色。 XXL-Job 特点XXL-Job是一个专注于分布式任务调度的平台提供任务管理中心、执行器节点、任务依赖、分布式执行等特性。它具有简单的Web界面和管理功能适合处理大规模分布式任务。 适用场景XXL-Job适合大规模分布式任务的定时调度和管理如数据同步、报表生成等。它具有高可用性、伸缩性和任务管理功能。 PowerJob 特点PowerJobHydrogen Job是一个开源的分布式任务调度框架旨在提供高性能、高可用性、易用性和可扩展性。它支持分布式任务的执行、任务定义、任务依赖、分布式锁等功能。 适用场景PowerJob适用于需要高性能和可扩展性的大规模分布式任务。它提供了任务调度中心、执行器节点、任务依赖等特性可用于各种数据处理、ETL和任务调度场景。 如何抉择 适合的才是最好的 如果你需要一个通用的任务调度框架Quartz 是一个不错的选择特别是在单机或小规模分布式环境中。 如果你需要在大规模分布式环境中管理任务调度XXL-Job 或 PowerJob 是更合适的它们提供了分布式任务执行和管理的特性适合处理大量任务。 XXL-Job 更加关注易用性和任务管理PowerJob 注重性能和扩展性具有更高的性能和弹性。 Quartz 比较老了对分布式的支持不太友好对于微服务项目来说不太建议。PowerJob 没用过基于目前的场景来说暂时用不到后续可以考虑。本项目先使用 XXL-Job 作为分布式管理任务调度框架。 mingyue-common-job 新建模块引入依赖 核心依赖 xxl-job-core dependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-autoconfigure/artifactId/dependency ​!-- 服务发现组件 --dependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-commons/artifactId/dependency ​!-- xxl-job-core --dependencygroupIdcom.xuxueli/groupIdartifactIdxxl-job-core/artifactId/dependency ​dependencygroupIdorg.projectlombok/groupIdartifactIdlombok/artifactId/dependency ​dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-core/artifactId/dependency /dependencies mingyue-xxl-job-admin 新建模块引入依赖 核心依赖 mingyue-common-job dependencies!-- SpringCloud Alibaba Nacos --dependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-nacos-discovery/artifactId/dependency ​!-- SpringCloud Alibaba Nacos Config --dependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-nacos-config/artifactId/dependency ​!-- SpringCloud Alibaba Sentinel --dependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-sentinel/artifactId/dependency ​!-- starter-testjunit spring-test mockito --dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-test/artifactIdscopetest/scope/dependency ​!-- freemarker-starter --dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-freemarker/artifactId/dependency ​!-- mail-starter --dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-mail/artifactId/dependency ​!-- starter-actuator --dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-actuator/artifactId/dependency ​!-- mybatis-startermybatis mybatis-spring hikaridefault --dependencygroupIdorg.mybatis.spring.boot/groupIdartifactIdmybatis-spring-boot-starter/artifactId/dependency ​!-- mysql --dependencygroupIdcom.mysql/groupIdartifactIdmysql-connector-j/artifactId/dependency ​dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-web/artifactId/dependency ​!-- xxl-job-core --dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-job/artifactId/dependency /dependencies 复制代码 Gitee: xxl-job: 一个分布式任务调度平台其核心设计目标是开发迅速、学习简单、轻量级、易扩展。现已开放源代码并接入多家公司线上产品线开箱即用。 - Gitee.com 选择需要的分支复制 xxl-job-admin 代码到 mingyue-xxl-job-admin 项目 mingyue-xxl-job-admin Nacos 配置 # 任务调度配置 # server 配置 spring:datasource:type: com.zaxxer.hikari.HikariDataSourcedriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://mingyue-mysql:3306/mingyue_job?useUnicodetruecharacterEncodingutf8zeroDateTimeBehaviorconvertToNulluseSSLtrueserverTimezoneGMT%2B8rewriteBatchedStatementstrueallowPublicKeyRetrievaltrueusername: rootpassword: mingyuehikari:auto-commit: trueconnection-test-query: SELECT 1connection-timeout: 10000idle-timeout: 30000max-lifetime: 900000maximum-pool-size: 30minimum-idle: 10pool-name: HikariCPvalidation-timeout: 1000mail:from: xxxqq.comhost: smtp.qq.comusername: xxxqq.compassword: xxxport: 25properties:mail:smtp:auth: truesocketFactory:class: javax.net.ssl.SSLSocketFactorystarttls:enable: truerequired: true ​ # mybatis 配置 mybatis:mapper-locations: classpath:/mybatis-mapper/*Mapper.xml ​ # Actuator 监控端点的配置项 management:health:mail:enabled: falseendpoints:web:exposure:include: *endpoint:health:show-details: ALWAYSlogfile:external-file: ./logs/${spring.application.name}/console.log ​ # xxljob系统配置 xxl:job:# 鉴权tokenaccessToken: xxl-job# 国际化i18n: zh_CN# 日志清理logretentiondays: 30triggerpool:fast:max: 200slow:max: 100 启动项目 用户名admin 密码123456 登录地址http://mingyue-job:9100/ 登陆成功后可以看到如下页面并且后台启动日志没有异常信息打印即可 2023-10-26 09:49:10 [xxl-job, admin JobScheduleHelper#scheduleThread] INFO c.x.j.a.c.thread.JobScheduleHelper- init xxl-job admin scheduler success. 2023-10-26 09:49:10 [xxl-job, admin JobFailMonitorHelper] INFO com.zaxxer.hikari.HikariDataSource- HikariCP - Start completed. mingyue-job 新建模块引入依赖 dependencies!-- SpringCloud Alibaba Nacos --dependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-nacos-discovery/artifactId/dependency ​!-- SpringCloud Alibaba Nacos Config --dependencygroupIdcom.alibaba.cloud/groupIdartifactIdspring-cloud-starter-alibaba-nacos-config/artifactId/dependency ​!-- web容器 --dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-web/artifactId/dependency ​!-- 接口文档 --dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-doc/artifactId/dependency ​!-- 认证工具 --dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-security/artifactId/dependency ​dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-mybatis/artifactId/dependency ​dependencygroupIdcom.csp.mingyue/groupIdartifactIdmingyue-common-job/artifactId/dependency /dependencies XxlJob开发示例 Slf4j Service public class SampleService { ​/*** 1、简单任务示例Bean模式*/XxlJob(demoJobHandler)public void demoJobHandler() throws Exception {XxlJobHelper.log(XXL-JOB, Hello World.); ​for (int i 0; i 5; i) {XxlJobHelper.log(beat at: i);}// default success} } mingyue-job Nacos 配置 # 定时服务配置 spring:datasource:type: com.zaxxer.hikari.HikariDataSourcedriver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://mingyue-mysql:3306/mingyue_job?useUnicodetruecharacterEncodingutf8zeroDateTimeBehaviorconvertToNulluseSSLtrueserverTimezoneGMT%2B8rewriteBatchedStatementstrueallowPublicKeyRetrievaltrueusername: rootpassword: mingyue ​ xxl:job:# 执行器开关enabled: true# 调度中心地址如调度中心集群部署存在多个地址则用逗号分隔。# admin-addresses: http://localhost:9900# 调度中心应用名 通过服务名连接调度中心(启用admin-appname会导致admin-addresses不生效)admin-appName: mingyue-xxl-job-admin# 执行器通讯TOKEN非空时启用access-token: xxl-job# 执行器配置executor:# 执行器AppName执行器心跳注册分组依据为空则关闭自动注册appName: ${spring.application.name}-executor# 29203 端口 随着主应用端口飘逸 避免集群冲突port: 2${server.port}# 执行器注册默认IP:PORTaddress:# 执行器IP默认自动获取IPip:# 执行器运行日志文件存储磁盘路径logpath: ./logs/${spring.application.name}/xxl-job# 执行器日志文件保存天数大于3生效logretentiondays: 30 启动测试 选择 测试任务1执行一次 执行成功后查看执行日志 2023-10-26 15:25:59 [com.xxl.job.core.thread.JobThread#run]-[133]-[xxl-job, JobThread-1-1698305159363] ----------- xxl-job job execute start ----------- ----------- Param: 2023-10-26 15:25:59 [com.csp.mingyue.job.service.SampleService#demoJobHandler]-[36]-[xxl-job, JobThread-1-1698305159363] XXL-JOB, Hello World. 2023-10-26 15:25:59 [com.csp.mingyue.job.service.SampleService#demoJobHandler]-[39]-[xxl-job, JobThread-1-1698305159363] beat at:0 2023-10-26 15:25:59 [com.csp.mingyue.job.service.SampleService#demoJobHandler]-[39]-[xxl-job, JobThread-1-1698305159363] beat at:1 2023-10-26 15:25:59 [com.csp.mingyue.job.service.SampleService#demoJobHandler]-[39]-[xxl-job, JobThread-1-1698305159363] beat at:2 2023-10-26 15:25:59 [com.csp.mingyue.job.service.SampleService#demoJobHandler]-[39]-[xxl-job, JobThread-1-1698305159363] beat at:3 2023-10-26 15:25:59 [com.csp.mingyue.job.service.SampleService#demoJobHandler]-[39]-[xxl-job, JobThread-1-1698305159363] beat at:4 2023-10-26 15:25:59 [com.xxl.job.core.thread.JobThread#run]-[179]-[xxl-job, JobThread-1-1698305159363] ----------- xxl-job job execute end(finish) ----------- ----------- Result: handleCode200, handleMsg null 2023-10-26 15:25:59 [com.xxl.job.core.thread.TriggerCallbackThread#callbackLog]-[197]-[xxl-job, executor TriggerCallbackThread] ----------- xxl-job job callback finish. ​ [Load Log Finish]
http://www.zqtcl.cn/news/256711/

相关文章:

  • 张家口网站建设公司柒零叁网站建设湖南长沙
  • 网站建设合同或方案书手机链接ppt在哪个网站做
  • 宁波专业做网站免费网站模板大全
  • 高站网站建设平台设计标准
  • api网站模板wordpress 函数api文件
  • 泉州哪个公司网站做的好百度反馈中心
  • 宽屏蓝色企业网站源码软件工程师英文
  • 中企动力网站建设公司网站的设计路线
  • 宠物网站制作内容正规货源网站大全
  • 网站建设pc端软件公司简介
  • 科技公司企业网站源码如何免费建购物网站
  • 用动物做网站名甘肃省城乡建设网站
  • 重庆网站制作长沙榆林网站建设
  • 加快政务公开网站建设在中企动力工作的感受
  • 佛山网站搜索排名宿迁新站seo
  • 上海免费网站建设公司南通高端网站
  • 网站被镜像 站长学院那个网站都有做莱的图片
  • 个人简历 网站开发做同城网站需要哪些手续
  • 建网站的公司南京网站权重是什么
  • 网站建设策略百度云域名没有备案怎么做网站
  • 档案网站建设图片网站名查找
  • 九亭镇村镇建设办官方网站好看的网站设计公司
  • 怎样建立门户网站怎么用wordpress模板
  • 潍坊专业建站wordpress建个人博客
  • 手把手网站开发网站建设违法行为
  • 网站模板插件做网站要审批吗
  • 建立网站如何盈利有哪些做室内设计好用的网站有哪些
  • 商城网站设计服务商网站开发时的闭包写法
  • 福建永安建设局网站如何在百度免费发布广告
  • 网站建设要用到哪些应用工具国际新闻最新消息今天2024年