Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-process-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2d9b00fc
authored
Sep 15, 2023
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]admin监控添加
1 parent
733e47f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
6 deletions
platform-process/pom.xml
platform-process/src/main/java/cn/com/glsx/Application.java
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/core/XxlJobUtil.java
platform-process/src/main/java/cn/com/glsx/process/modules/controller/TestXXLJobController.java
platform-process/src/main/java/cn/com/glsx/process/modules/service/UserDemoService.java
platform-process/pom.xml
View file @
2d9b00f
...
@@ -95,7 +95,27 @@
...
@@ -95,7 +95,27 @@
<groupId>
com.glsx
</groupId>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-redis
</artifactId>
<artifactId>
rest-admin-redis
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-client
</artifactId>
<version>
2.6.11
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.14
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
platform-process/src/main/java/cn/com/glsx/Application.java
View file @
2d9b00f
...
@@ -34,6 +34,8 @@ public class Application implements CommandLineRunner {
...
@@ -34,6 +34,8 @@ public class Application implements CommandLineRunner {
SpringApplication
.
run
(
Application
.
class
,
args
);
SpringApplication
.
run
(
Application
.
class
,
args
);
}
}
@PostConstruct
@PostConstruct
void
started
()
{
void
started
()
{
TimeZone
.
setDefault
(
getTimeZone
(
of
(
"Asia/Shanghai"
)));
TimeZone
.
setDefault
(
getTimeZone
(
of
(
"Asia/Shanghai"
)));
...
...
platform-process/src/main/java/cn/com/glsx/process/job/xxljob/core/XxlJobUtil.java
View file @
2d9b00f
This diff is collapsed.
Click to expand it.
platform-process/src/main/java/cn/com/glsx/process/modules/controller/TestXXLJobController.java
View file @
2d9b00f
...
@@ -42,11 +42,17 @@ public class TestXXLJobController {
...
@@ -42,11 +42,17 @@ public class TestXXLJobController {
@PostMapping
(
"/jobtestupdate"
)
@PostMapping
(
"/jobtestupdate"
)
@Operation
(
summary
=
"动态任务更新"
,
description
=
"动态任务更新"
)
@Operation
(
summary
=
"动态任务更新"
,
description
=
"动态任务更新"
)
public
void
updatetest
(
@RequestParam
(
"cron"
)
String
cron
,
@RequestParam
(
"id"
)
Integer
id
)
{
public
void
updatetest
(
@RequestParam
(
"cron"
)
String
cron
,
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"executorParam"
)
String
executorParam
,
@RequestParam
(
"jobDesc"
)
String
jobDesc
,
@RequestParam
(
"triggerStatus"
)
Integer
triggerStatus
)
{
XxlJobInfo
jobInfo
=
new
XxlJobInfo
();
XxlJobInfo
jobInfo
=
new
XxlJobInfo
();
jobInfo
.
set
Id
(
id
);
jobInfo
.
set
BusKey
(
id
);
jobInfo
.
setScheduleConf
(
cron
);
jobInfo
.
setScheduleConf
(
cron
);
jobInfo
.
setJobDesc
(
jobDesc
);
jobInfo
.
setExecutorParam
(
executorParam
);
jobInfo
.
setTriggerStatus
(
triggerStatus
);
XxlJobUtil
.
update
(
jobInfo
);
XxlJobUtil
.
update
(
jobInfo
);
}
}
...
...
platform-process/src/main/java/cn/com/glsx/process/modules/service/UserDemoService.java
View file @
2d9b00f
package
cn
.
com
.
glsx
.
process
.
modules
.
service
;
package
cn
.
com
.
glsx
.
process
.
modules
.
service
;
import
cn.com.glsx.process.job.xxljob.core.ExecutorRouteStrategyEnum
;
import
cn.com.glsx.process.modules.converter.UserConverter
;
import
cn.com.glsx.process.modules.converter.UserConverter
;
import
cn.com.glsx.process.modules.entity.User
;
import
cn.com.glsx.process.modules.entity.User
;
import
cn.com.glsx.process.modules.mapper.UserMapper
;
import
cn.com.glsx.process.modules.mapper.UserMapper
;
import
cn.com.glsx.process.modules.model.UserDTO
;
import
cn.com.glsx.process.modules.model.UserDTO
;
import
cn.com.glsx.process.modules.model.UserSearch
;
import
cn.com.glsx.process.modules.model.UserSearch
;
import
cn.com.glsx.process.redis.DistributedLock
;
import
cn.com.glsx.process.redis.DistributedLockUtils
;
import
cn.com.glsx.process.redis.DistributedLockUtils
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.plat.common.utils.ObjectUtils
;
import
com.glsx.plat.common.utils.ObjectUtils
;
...
@@ -146,7 +146,7 @@ public class UserDemoService {
...
@@ -146,7 +146,7 @@ public class UserDemoService {
}
}
private
void
aa
(
User
user
)
throws
InterruptedException
{
private
void
aa
(
User
user
)
throws
InterruptedException
{
System
.
out
.
println
(
"user"
);
System
.
out
.
println
(
ExecutorRouteStrategyEnum
.
FIRST
.
name
()
);
Thread
.
sleep
(
10
*
1000
);
Thread
.
sleep
(
10
*
1000
);
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment