You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
455 B
18 lines
455 B
/**
|
|
* 命令解析工具类(控制层-处理命令别名)
|
|
*/
|
|
public class CommandParser {
|
|
public static String parseAlias(String command) {
|
|
if (command == null) {
|
|
return null;
|
|
}
|
|
// 处理别名:c -> crawl
|
|
switch (command.trim()) {
|
|
case "c":
|
|
return "crawl";
|
|
// 可扩展其他别名
|
|
default:
|
|
return command.trim();
|
|
}
|
|
}
|
|
}
|