Commit 626d323c by 罗胜

漏洞问题处理

parent 193c97a0
...@@ -22,35 +22,35 @@ public class DbSoundsMonitorTask { ...@@ -22,35 +22,35 @@ public class DbSoundsMonitorTask {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
if (args == null || args.length == 0){ // if (args == null || args.length == 0){
//本地启动是可以。到了服务器变成了java.io.FileNotFoundException: file:/data/smsAndEmailTest/task-3.0-SNAPSHOT.jar!/global.properties (No such file or directory) // //本地启动是可以。到了服务器变成了java.io.FileNotFoundException: file:/data/smsAndEmailTest/task-3.0-SNAPSHOT.jar!/global.properties (No such file or directory)
//loadConf(Thread.currentThread().getContextClassLoader().getResource("global.properties").getPath()); // //loadConf(Thread.currentThread().getContextClassLoader().getResource("global.properties").getPath());
Properties properties = PropertiesUtils.getProperties(); // Properties properties = PropertiesUtils.getProperties();
load(properties); // load(properties);
}else { // }else {
loadConf(args[0]); // loadConf(args[0]);
} // }
} }
public static void loadConf(String path) throws Exception { public static void loadConf(String path) throws Exception {
Properties properties = PropertiesUtils.getProperties(path); // Properties properties = PropertiesUtils.getProperties(path);
load(properties); // load(properties);
} }
public static void load(Properties properties){ public static void load(Properties properties){
String aicc = properties.getProperty("aicc"); // String aicc = properties.getProperty("aicc");
String aicp = properties.getProperty("aicp"); // String aicp = properties.getProperty("aicp");
String resultCode = properties.getProperty("resultCode"); // String resultCode = properties.getProperty("resultCode");
String mobile = properties.getProperty("mobile"); // String mobile = properties.getProperty("mobile");
//查看定时任务最后同步时间 // //查看定时任务最后同步时间
SoundMonitorService.init(); // SoundMonitorService.init();
boolean i = SoundMonitorService.test(); // boolean i = SoundMonitorService.test();
if (!i){ // if (!i){
log.info("没有异常!"); // log.info("没有异常!");
return; // return;
} // }
//发送邮件和短信 // //发送邮件和短信
SoundMonitorService.sendEmailAndSms(aicc,aicp,resultCode,mobile); // SoundMonitorService.sendEmailAndSms(aicc,aicp,resultCode,mobile);
} }
} }
......
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