提交修改
This commit is contained in:
parent
b3957a5677
commit
3ddc2ca740
@ -219,13 +219,13 @@ public class TestController {
|
||||
// http://localhost:8888/app/test/email2?key=AD
|
||||
@RequestMapping("/email2")
|
||||
public R email2(String key) throws Exception {
|
||||
File file = new File("/Users/quyixiao/Desktop/test");
|
||||
File file = new File("/mnt/admin/test");
|
||||
List<String> list = new ArrayList<String>();
|
||||
showList(list, file);
|
||||
System.out.println("----------------x---------");
|
||||
log.info("----------------x---------");
|
||||
|
||||
for(String a: list){
|
||||
System.out.println("===============>" + a );
|
||||
log.info("===============>" + a );
|
||||
doSend(a);
|
||||
}
|
||||
return R.ok();
|
||||
@ -263,26 +263,12 @@ public class TestController {
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
File file = new File("/mnt/admin/test");
|
||||
List<String> list = new ArrayList<String>();
|
||||
showList(list, file);
|
||||
System.out.println("----------------x---------");
|
||||
|
||||
for(String a: list){
|
||||
System.out.println("===============>" + a );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void doSend(String fileName) throws Exception{
|
||||
count_flag = 0;
|
||||
// 读取文件内容到Stream流中,按行读取
|
||||
Stream<String> lines = Files.lines(Paths.get(fileName));
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
|
||||
// 随机行顺序进行数据处理
|
||||
lines.forEach(ele -> {
|
||||
|
||||
@ -337,7 +323,7 @@ public class TestController {
|
||||
+ param12;
|
||||
String md5 = MD5Utils.encode(param);
|
||||
apiPostCodeEntity.setMd5Unique(md5);
|
||||
System.out.println("=-------------------->"+ count_flag);
|
||||
log.info("=-------------------->"+ count_flag);
|
||||
rabbitTemplate.convertAndSend(accountLogNameQueue, JSON.toJSONString(apiPostCodeEntity));
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user