Commit 3abbdef3 by 罗胜

2024-09-25

硬编码修改
parent 6f0c05b3
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div id="importBox" class="hide"> <div id="importBox" class="hide">
<form id="importForm" action="${ctx}/sys/user/import" method="post" enctype="multipart/form-data" <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/> 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=" 导 入 "/> <input id="btnImportSubmit" class="btn btn-primary" type="submit" value=" 导 入 "/>
<a href="${ctx}/sys/user/import/template">下载模板</a> <a href="${ctx}/sys/user/import/template">下载模板</a>
</form> </form>
......
...@@ -189,7 +189,7 @@ public class GConstants { ...@@ -189,7 +189,7 @@ public class GConstants {
/** /**
* DES配置加密秘钥 * DES配置加密秘钥
*/ */
private static final String CONF_DESC_KEY = "782790337169117184"; // private static final String CONF_DESC_KEY = "782790337169117184";
/** /**
* foc api接口签名私钥,访问foc_api必须 * foc api接口签名私钥,访问foc_api必须
......
...@@ -27,37 +27,37 @@ import com.ejweb.core.security.DES3Utils; ...@@ -27,37 +27,37 @@ import com.ejweb.core.security.DES3Utils;
*/ */
public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer { 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>(); private Map<String, Boolean> keys = new HashMap<String, Boolean>();
@Override @Override
protected void processProperties(ConfigurableListableBeanFactory beanFactory, Properties props) protected void processProperties(ConfigurableListableBeanFactory beanFactory, Properties props)
throws BeansException { throws BeansException {
try { // try {
// 非开发环境需要对配置文件加密 // // 非开发环境需要对配置文件加密
if (getBoolean(props, "is.devmode", false) == false) { // if (getBoolean(props, "is.devmode", false) == false) {
Enumeration<?> enu = props.propertyNames(); // Enumeration<?> enu = props.propertyNames();
while (enu.hasMoreElements()) { // while (enu.hasMoreElements()) {
try { // try {
String key = (String) enu.nextElement(); // String key = (String) enu.nextElement();
if ("is.devmode".equals(key) == false && keys.get(key) == null) {// 还未处理 // if ("is.devmode".equals(key) == false && keys.get(key) == null) {// 还未处理
keys.put(key, true); // keys.put(key, true);
//
String val = (String) props.get(key); // String val = (String) props.get(key);
String decrypted = DES3Utils.decrypt(val, CONF_DESC_KEY); // String decrypted = DES3Utils.decrypt(val, CONF_DESC_KEY);
if (decrypted != null) { // if (decrypted != null) {
//
props.put(key, decrypted); // props.put(key, decrypted);
} // }
} // }
} catch (Exception e) { // } catch (Exception e) {
// TODO: handle exception // // TODO: handle exception
} // }
} // }
} // }
} catch (Exception e) { // } catch (Exception e) {
// TODO: handle exception // // TODO: handle exception
} // }
super.processProperties(beanFactory, props); 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