Commit fe8b17dd by 雷紫添

添加测试

parent 9bbbab2e
......@@ -3,8 +3,10 @@ package com.founder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication
@EnableAsync
@ComponentScan(basePackages = {"com.founder.*"})
public class Application {
......
......@@ -23,9 +23,14 @@ import java.util.List;
import java.util.Map;
@RestController
public class FaceController {
@Autowired
private FaceService faceService;
@ResponseBody
@RequestMapping("/query")
public String query() {
System.out.println("1111111111111111111");
faceService.sync();;
System.out.println("33333333333333333");
/* List<Face> face = faceService.query();
for (Map<String, String> item : codeMsg.getStatus()) {
if (item.get("code").equals("001"))
......@@ -36,7 +41,7 @@ public class FaceController {
System.out.println(item.get("name"));
}
});*/
final Base64.Decoder decoder = Base64.getDecoder();
/* final Base64.Decoder decoder = Base64.getDecoder();
final Base64.Encoder encoder = Base64.getEncoder();
Jccj jccj =new Jccj();
try {
......@@ -66,7 +71,7 @@ public class FaceController {
System.out.println("返回的参数为::"+jsonResult.toJSONString());
} catch (IOException e) {
e.printStackTrace();
}
}*/
return "已执行";
}
......
......@@ -2,6 +2,7 @@ package com.founder.service;
import com.founder.model.Face;
import org.springframework.scheduling.annotation.Async;
import java.util.List;
......@@ -10,4 +11,6 @@ import java.util.List;
*/
public interface FaceService {
public List<Face> query();
@Async
public void sync();
}
......@@ -21,4 +21,9 @@ public class FaceServiceImpl implements FaceService {
List<Face> face = faceDao.query();
return face;
}
@Override
public void sync() {
System.out.println("22222222222222");
}
}
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