HaikangApplicationTests.java
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.sincere.haikang;
import com.sincere.haikang.bean.StudentBean;
import com.sincere.haikang.dao.UserDao;
import com.sincere.haikang.server.AttendanceService;
import com.sincere.haikang.test.TK_Question;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
@RunWith(SpringRunner.class)
@SpringBootTest
public class HaikangApplicationTests {
// @Autowired
// AttendanceService attendanceService;
@Autowired
UserDao userDao;
// private String url = "http://172.16.3.174:8001/";
private String url = "http://114.55.30.100:9020/";
@Test
public void my() throws IOException {
File file = new File("C:\\TaoHandong\\copy\\21_qiandaoErr.txt");
BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
String content = "";
String result = "";
while ((content=bufferedReader.readLine())!=null){
if (content.split("cardNo:").length>1&&!result.contains(content.split("cardNo:")[1])){
result+="\'"+content.split("cardNo:")[1]+"\',";
}
}
System.out.println("result:"+result+result.split(",").length);
}
@Test
public void contextLoads() {
}
@Test
public void test(){
}
}