提交修改
This commit is contained in:
parent
eae74ff36c
commit
0b84d70dd0
@ -64,10 +64,15 @@ public class ThirdTaskController {
|
|||||||
commandDto = JSONObject.parseObject(a, CommandDto.class);
|
commandDto = JSONObject.parseObject(a, CommandDto.class);
|
||||||
String[] tokens = TaskCommand.parse(commandDto.getCommand());
|
String[] tokens = TaskCommand.parse(commandDto.getCommand());
|
||||||
log.info("parse data :" + Arrays.toString(tokens));
|
log.info("parse data :" + Arrays.toString(tokens));
|
||||||
Object object = SpringContextUtils.getBean(tokens[0]);
|
Object object = null;
|
||||||
|
try {
|
||||||
|
object = SpringContextUtils.getBean(tokens[0]);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return R.error("命令不存在。");
|
return R.error("命令不存在。");
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
return R.error("命令不存在。");
|
||||||
|
}
|
||||||
ICommand iCommand = (ICommand) object;
|
ICommand iCommand = (ICommand) object;
|
||||||
iCommand.init(user, tokens);
|
iCommand.init(user, tokens);
|
||||||
TwoTuple<Boolean, String> check = iCommand.check().getData();
|
TwoTuple<Boolean, String> check = iCommand.check().getData();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user