Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
ufo-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
mali
6 years ago
Commit
4e8ef1e43123d27205116363168dfbf4b2bd75c3
1 parent
840f2699
手动执行定时任务
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
common/src/main/java/com/yoho/ufo/restapi/ScheduledManualController.java
common/src/main/java/com/yoho/ufo/restapi/ScheduledManualController.java
View file @
4e8ef1e
package
com
.
yoho
.
ufo
.
restapi
;
import
com.yoho.quartz.job.YhJob
;
import
com.yoho.ufo.service.model.*
;
import
com.yoho.ufo.service.model.ApiResponse
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
* Created by li.ma on 2019/2/1.
...
...
@@ -22,11 +25,11 @@ public class ScheduledManualController implements ApplicationContextAware{
}
@RequestMapping
(
value
=
"/scheduledManual"
)
public
String
scheduledManual
(
@RequestParam
(
name
=
"scheduledName"
,
required
=
true
)
String
scheduledName
)
{
@ResponseBody
public
ApiResponse
scheduledManual
(
@RequestParam
(
name
=
"scheduledName"
,
required
=
true
)
String
scheduledName
)
{
YhJob
jobObject
=
applicationContext
.
getBean
(
scheduledName
,
YhJob
.
class
);
jobObject
.
process
(
null
);
return
"SUCCESS"
;
return
new
ApiResponse
(
200
,
"处理成功"
,
null
);
}
}
...
...
Please
register
or
login
to post a comment