Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
9850695e
Commit
9850695e
authored
Jan 04, 2022
by
killer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据加密
parent
6032aff3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
2 deletions
+79
-2
pom.xml
pom.xml
+9
-2
XxlJobExecutorConfig.java
.../java/cn/quantgroup/xyqb/config/XxlJobExecutorConfig.java
+53
-0
DatabaseColumnEncryptJob.java
...java/cn/quantgroup/xyqb/job/DatabaseColumnEncryptJob.java
+17
-0
No files found.
pom.xml
View file @
9850695e
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
<junit.jupiter.version>
5.0.2
</junit.jupiter.version>
<junit.jupiter.version>
5.0.2
</junit.jupiter.version>
<maven.test.skip>
true
</maven.test.skip>
<maven.test.skip>
true
</maven.test.skip>
<org.springframework.security.version>
3.2.7.RELEASE
</org.springframework.security.version>
<org.springframework.security.version>
3.2.7.RELEASE
</org.springframework.security.version>
<xxl.job.version>
2.1.0
</xxl.job.version>
<qg.security.version>
0.1.2
</qg.security.version>
</properties>
</properties>
<dependencies>
<dependencies>
...
@@ -416,9 +418,14 @@
...
@@ -416,9 +418,14 @@
<dependency>
<dependency>
<groupId>
cn.quantgroup
</groupId>
<groupId>
cn.quantgroup
</groupId>
<artifactId>
security
</artifactId>
<artifactId>
security
</artifactId>
<version>
0.1.2
</version>
<version>
${qg.security.version}
</version>
</dependency>
<!-- xxl-job -->
<dependency>
<groupId>
com.xuxueli
</groupId>
<artifactId>
xxl-job-core
</artifactId>
<version>
${xxl.job.version}
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
src/main/java/cn/quantgroup/xyqb/config/XxlJobExecutorConfig.java
0 → 100644
View file @
9850695e
package
cn
.
quantgroup
.
xyqb
.
config
;
import
com.xxl.job.core.executor.impl.XxlJobSpringExecutor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* 定时任务配置
*
* @author killer
* @date 2022年01月04日
**/
@Slf4j
@Configuration
public
class
XxlJobExecutorConfig
{
@Value
(
"${xxl.job.admin.address}"
)
private
String
jobAdminAddress
;
@Value
(
"${xxl.job.log.path}"
)
private
String
logPath
;
@Bean
(
initMethod
=
"start"
,
destroyMethod
=
"destroy"
)
public
XxlJobSpringExecutor
xxlJobExecutor
()
{
log
.
info
(
">>>>>>>>>>> xxl-job config init."
);
XxlJobSpringExecutor
xxlJobSpringExecutor
=
new
XxlJobSpringExecutor
();
// 调度中心部署跟地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
xxlJobSpringExecutor
.
setAdminAddresses
(
jobAdminAddress
);
// 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册
xxlJobSpringExecutor
.
setAppName
(
"xxl-job-executor-xyqb-user"
);
// 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
xxlJobSpringExecutor
.
setIp
(
null
);
// 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
xxlJobSpringExecutor
.
setPort
(
9999
);
// 执行器通讯TOKEN [选填]:非空时启用;调度中心和执行器进行安全性校验,双方AccessToken匹配才允许通讯
xxlJobSpringExecutor
.
setAccessToken
(
"quant-group-vcc-xxl-job"
);
// 执行器运行日志文件存储磁盘路径 [选填] :需要对该路径拥有读写权限;为空则使用默认路径;
xxlJobSpringExecutor
.
setLogPath
(
logPath
);
// 执行器日志保存天数 [选填] :值大于3时生效,启用执行器Log文件定期清理功能,否则不生效;
xxlJobSpringExecutor
.
setLogRetentionDays
(
0
);
return
xxlJobSpringExecutor
;
}
}
src/main/java/cn/quantgroup/xyqb/job/DatabaseColumnEncryptJob.java
0 → 100644
View file @
9850695e
package
cn
.
quantgroup
.
xyqb
.
job
;
import
com.xxl.job.core.handler.annotation.JobHandler
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/**
* 数据库字段加密任务
*
* @author killer
* @date 2022年01月04日
**/
@Slf4j
@Component
@JobHandler
(
value
=
"databaseColumnEncryptJob"
)
public
class
DatabaseColumnEncryptJob
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment