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.
39 lines
675 B
39 lines
675 B
7 years ago
|
package com.fr.start.module;
|
||
|
|
||
7 years ago
|
import com.fr.general.ComparatorUtils;
|
||
|
|
||
7 years ago
|
/**
|
||
|
* Created by juhaoyu on 2018/1/8.
|
||
|
* 封装启动参数
|
||
|
*/
|
||
|
public class StartupArgs {
|
||
|
|
||
|
private final String[] args;
|
||
|
|
||
|
public StartupArgs(String[] args) {
|
||
|
|
||
|
this.args = args;
|
||
|
}
|
||
|
|
||
|
public String[] get() {
|
||
|
|
||
|
return args;
|
||
|
}
|
||
7 years ago
|
|
||
|
/**
|
||
|
* 是否是产品演示
|
||
|
*/
|
||
|
public boolean isDemo() {
|
||
|
|
||
|
if (args != null) {
|
||
|
for (String arg : args) {
|
||
|
if (ComparatorUtils.equals(arg, "demo")) {
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
7 years ago
|
}
|
||
|
|