Commit 3abbdef3 by 罗胜

2024-09-25

硬编码修改
parent 6f0c05b3
......@@ -40,7 +40,7 @@
<div id="importBox" class="hide">
<form id="importForm" action="${ctx}/sys/user/import" method="post" enctype="multipart/form-data"
class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入,请稍等...');"><br/>
<input id="uploadFile" name="file" type="file" style="width:330px" accept=".xls,.xlsx"/><br/><br/>  
<%-- <input id="uploadFile" name="file" type="file" style="width:330px" accept=".xls,.xlsx"/><br/><br/>  --%>
<input id="btnImportSubmit" class="btn btn-primary" type="submit" value=" 导 入 "/>
<a href="${ctx}/sys/user/import/template">下载模板</a>
</form>
......
......@@ -189,7 +189,7 @@ public class GConstants {
/**
* DES配置加密秘钥
*/
private static final String CONF_DESC_KEY = "782790337169117184";
// private static final String CONF_DESC_KEY = "782790337169117184";
/**
* foc api接口签名私钥,访问foc_api必须
......
......@@ -27,37 +27,37 @@ import com.ejweb.core.security.DES3Utils;
*/
public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer {
private static final String CONF_DESC_KEY = "782790337169117184";
// private static final String CONF_DESC_KEY = "782790337169117184";
private Map<String, Boolean> keys = new HashMap<String, Boolean>();
@Override
protected void processProperties(ConfigurableListableBeanFactory beanFactory, Properties props)
throws BeansException {
try {
// 非开发环境需要对配置文件加密
if (getBoolean(props, "is.devmode", false) == false) {
Enumeration<?> enu = props.propertyNames();
while (enu.hasMoreElements()) {
try {
String key = (String) enu.nextElement();
if ("is.devmode".equals(key) == false && keys.get(key) == null) {// 还未处理
keys.put(key, true);
String val = (String) props.get(key);
String decrypted = DES3Utils.decrypt(val, CONF_DESC_KEY);
if (decrypted != null) {
props.put(key, decrypted);
}
}
} catch (Exception e) {
// TODO: handle exception
}
}
}
} catch (Exception e) {
// TODO: handle exception
}
// try {
// // 非开发环境需要对配置文件加密
// if (getBoolean(props, "is.devmode", false) == false) {
// Enumeration<?> enu = props.propertyNames();
// while (enu.hasMoreElements()) {
// try {
// String key = (String) enu.nextElement();
// if ("is.devmode".equals(key) == false && keys.get(key) == null) {// 还未处理
// keys.put(key, true);
//
// String val = (String) props.get(key);
// String decrypted = DES3Utils.decrypt(val, CONF_DESC_KEY);
// if (decrypted != null) {
//
// props.put(key, decrypted);
// }
// }
// } catch (Exception e) {
// // TODO: handle exception
// }
// }
// }
// } catch (Exception e) {
// // TODO: handle exception
// }
super.processProperties(beanFactory, props);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment