XXL-JOB搭建使用

XXL-JOB搭建使用

一、源码下载

下载地址
1、github: https://github.com/xuxueli/xxl-job
2、官方网站:http://www.xuxueli.com/xxl-job
二、文档教程
1、中文文档教程:http://www.xuxueli.com/xxl-job/#/
2、英语文档:http://www.xuxueli.com/xxl-job/en/#/
三、本地搭建指导
1、源码下载后导入IDEA,项目导入完成后。找到"调度数据库初始化SQL脚本"并执行
在这里插入图片描述
2、将以上文件放入本地Mysql执行后,生成一下文件
在这里插入图片描述
3、数据文件成功生成后,将项目内”application.properties“文件修改。将数据访问地址修改本地,填写对应账户、密码。

 ### 调度中心项目的端口号以及访问路径
server.port=8080
server.context-path=/xxl-job-admin

 ### 配置静态文件的前缀
spring.mvc.static-path-pattern=/static/**
spring.resources.static-locations=classpath:/static/

### 配置模板文件
spring.freemarker.templateLoaderPath=classpath:/templates/
spring.freemarker.suffix=.ftl
spring.freemarker.charset=UTF-8
spring.freemarker.request-context-attribute=request
spring.freemarker.settings.number_format=0.##########

 ### mybatis的mapper文件地址
mybatis.mapper-locations=classpath:/mybatis-mapper/*Mapper.xml

 ### 数据库的地址
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?Unicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=root_PWD
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource
spring.datasource.tomcat.max-wait=10000
spring.datasource.tomcat.max-active=30
spring.datasource.tomcat.test-on-borrow=true
spring.datasource.tomcat.validation-query=SELECT 1
spring.datasource.tomcat.validation-interval=30000

### 报警邮箱
spring.mail.host=smtp.qq.com
spring.mail.port=25
spring.mail.username=xxx@qq.com
spring.mail.password=xxx
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory

###调度中心Token
xxl.job.accessToken=

### 语音版本
xxl.job.i18n=

4、以上准备结束后就可以在IDEA中执行了(注意:选择XxlJobAdminApplication启动)。
在这里插入图片描述
启动成功后,在浏览器输入:http://127.0.0.1:8080/xxl-job-admin/ 输入账户、密码
(admin、123456)即可访问。主界面如下:
在这里插入图片描述

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Zachary_CN

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值