Commit 626d323c by 罗胜

漏洞问题处理

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