Browse Source
* commit '45e1967a84a5d78e335002d05162ccfa83902ed4': REPORT-4412 插件脚本文件更新问题 2/3master
superman
7 years ago
7 changed files with 9 additions and 42 deletions
@ -1,34 +0,0 @@ |
|||||||
package com.fr.design.extra; |
|
||||||
|
|
||||||
import com.fr.base.FRContext; |
|
||||||
import com.fr.stable.StableUtils; |
|
||||||
import com.fr.stable.StringUtils; |
|
||||||
|
|
||||||
import java.io.FileInputStream; |
|
||||||
import java.util.Properties; |
|
||||||
|
|
||||||
/** |
|
||||||
* Created by vito on 16/4/22. |
|
||||||
*/ |
|
||||||
public class PluginStoreConstants { |
|
||||||
|
|
||||||
public static final String VERSION = loadAttribute("VERSION", ""); |
|
||||||
|
|
||||||
private static Properties PROP = null; |
|
||||||
|
|
||||||
private static String loadAttribute(String key, String defaultValue) { |
|
||||||
if (PROP == null) { |
|
||||||
PROP = new Properties(); |
|
||||||
try { |
|
||||||
PROP.load(new FileInputStream(StableUtils.pathJoin(FRContext.getCurrentEnv().getWebReportPath(), "scripts/store/web/plugin_store.properties"))); |
|
||||||
} catch (Exception e) { |
|
||||||
} |
|
||||||
} |
|
||||||
String p = PROP.getProperty(key); |
|
||||||
if (StringUtils.isEmpty(p)) { |
|
||||||
p = defaultValue; |
|
||||||
} |
|
||||||
return p; |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue