命名更新

v1.3
xueli.xue 9 years ago
parent 8e31f7fbf2
commit 71a033771f

@ -93,10 +93,10 @@ public class JobInfoController {
return new ReturnT<String>(500, "请输入“任务描述”");
}
if (StringUtils.isBlank(handler_address)) {
return new ReturnT<String>(500, "请输入“器地址”");
return new ReturnT<String>(500, "请输入“执行器地址”");
}
if (glueSwitch==0 && StringUtils.isBlank(handler_name)) {
return new ReturnT<String>(500, "请输入“执行器”");
return new ReturnT<String>(500, "请输入“jobHandler”");
}
if (StringUtils.isBlank(author)) {
return new ReturnT<String>(500, "请输入“负责人”");
@ -174,10 +174,10 @@ public class JobInfoController {
return new ReturnT<String>(500, "请输入“任务描述”");
}
if (StringUtils.isBlank(handler_address)) {
return new ReturnT<String>(500, "请输入“器地址”");
return new ReturnT<String>(500, "请输入“执行器地址”");
}
if (glueSwitch==0 && StringUtils.isBlank(handler_name)) {
return new ReturnT<String>(500, "请输入“执行器”");
return new ReturnT<String>(500, "请输入“jobHandler”");
}
if (StringUtils.isBlank(author)) {
return new ReturnT<String>(500, "请输入“负责人”");

@ -125,10 +125,10 @@
<div class="col-sm-4"><input type="text" class="form-control" name="jobDesc" placeholder="请输入“描述”" maxlength="200" ></div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">器地址<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_address" placeholder="请输入“远程-机器地址”" maxlength="200" ></div>
<label for="lastname" class="col-sm-2 control-label">执行器<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_name" placeholder="请输入“远程-执行器”" maxlength="200" ></div>
<label for="lastname" class="col-sm-2 control-label">执行器地址<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_address" placeholder="请输入“执行器地址”" maxlength="200" ></div>
<label for="lastname" class="col-sm-2 control-label">jobHandler<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_name" placeholder="请输入“jobHandler”" maxlength="200" ></div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-2 control-label">执行参数<font color="black">*</font></label>
@ -206,10 +206,10 @@ public class DemoJobHandler extends IJobHandler {
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">器地址<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_address" placeholder="请输入“远程-机器地址”" maxlength="200" ></div>
<label for="lastname" class="col-sm-2 control-label">执行器<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_name" placeholder="请输入“远程-执行器”" maxlength="200" ></div>
<label for="lastname" class="col-sm-2 control-label">执行器地址<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_address" placeholder="请输入“执行器地址”" maxlength="200" ></div>
<label for="lastname" class="col-sm-2 control-label">jobHandler<font color="red">*</font></label>
<div class="col-sm-4"><input type="text" class="form-control" name="handler_name" placeholder="请输入“jobHandler”" maxlength="200" ></div>
</div>
<div class="form-group">
<label for="firstname" class="col-sm-2 control-label">执行参数<font color="black">*</font></label>

@ -40,7 +40,7 @@ $(function() {
var _jobData = eval('(' + data + ')'); // row.jobData
var html = "<p title='" + data + "'>执行器:" + _jobData.handler_name +
"<br>执行参数:" + _jobData.handler_params +
"<br>执行器:" + _jobData.handler_address + "</p>";
"<br>执行地址" + _jobData.handler_address + "</p>";
return html;
}
},
@ -272,12 +272,12 @@ $(function() {
maxlength:"“任务描述”长度不应超过200位"
},
handler_address : {
required :"请输入“器地址”." ,
maxlength:"“器地址”长度不应超过200位"
required :"请输入“执行器地址”." ,
maxlength:"“执行器地址”长度不应超过200位"
},
handler_name : {
required : "请输入“执行器”." ,
maxlength: "“执行器”长度不应超过200位"
required : "请输入“jobHandler”." ,
maxlength: "“jobHandler”长度不应超过200位"
},
author : {
required : "请输入“负责人”." ,
@ -424,12 +424,12 @@ $(function() {
maxlength:"“任务描述”长度不应超过200位"
},
handler_address : {
required :"请输入“器地址”." ,
maxlength:"“器地址”长度不应超过200位"
required :"请输入“执行器地址”." ,
maxlength:"“执行器地址”长度不应超过200位"
},
handler_name : {
required : "请输入“执行器”." ,
maxlength: "“执行器”长度不应超过200位"
required : "请输入“jobHandler”." ,
maxlength: "“jobHandler”长度不应超过200位"
},
author : {
required : "请输入“负责人”." ,

@ -69,9 +69,9 @@ $(function() {
"visible" : true,
"render": function ( data, type, row ) {
var _jobData = eval('(' + data + ')'); // row.jobData
var html = "<p title='" + data + "'>执行器" + _jobData.handler_name +
var html = "<p title='" + data + "'>JobHandler" + _jobData.handler_name +
"<br>执行参数:" + _jobData.handler_params +
"<br>执行器:" + _jobData.handler_address + "</p>";
"<br>执行地址" + _jobData.handler_address + "</p>";
return data?'<a class="logMsg" href="javascript:;" >查看<span style="display:none;">'+ html +'</span></a>':"无";
}

@ -11,7 +11,7 @@ import com.xxl.job.client.handler.annotation.JobHander;
* demo job handler
* @author xuxueli 2015-12-19 19:43:36
*/
@JobHander(jobName="demoJobHandler")
@JobHander(name="demoJobHandler")
@Service
public class DemoJobHandler extends IJobHandler {
private static transient Logger logger = LoggerFactory.getLogger(DemoJobHandler.class);

@ -11,7 +11,7 @@
<context:component-scan base-package="com.xxl.job.service" />
<!-- Jetty任务执行器 -->
<!-- 执行器 -->
<bean id="xxlJobJettyServer" class="com.xxl.job.client.netcom.jetty.XxlJobJettyServer" init-method="start">
<property name="port" value="9999" />
</bean>

@ -13,6 +13,6 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
public @interface JobHander {
String jobName();
String name();
}

@ -75,7 +75,7 @@ public class XxlJobJettyServer implements ApplicationContextAware {
Map<String, Object> serviceBeanMap = XxlJobJettyServer.applicationContext.getBeansWithAnnotation(JobHander.class);
if (serviceBeanMap!=null && serviceBeanMap.size()>0) {
for (Object serviceBean : serviceBeanMap.values()) {
String jobName = serviceBean.getClass().getAnnotation(JobHander.class).jobName();
String jobName = serviceBean.getClass().getAnnotation(JobHander.class).name();
if (jobName!=null && jobName.trim().length()>0 && serviceBean instanceof IJobHandler) {
IJobHandler handler = (IJobHandler) serviceBean;
HandlerRepository.regist(jobName, handler);

Loading…
Cancel
Save