提交 d4774f8f authored 作者: aiqingguo's avatar aiqingguo

银行测试

上级 afc108c0
...@@ -44,14 +44,12 @@ public class TempBankController { ...@@ -44,14 +44,12 @@ public class TempBankController {
private void bankTest() throws Exception { private void bankTest() throws Exception {
String priKey = "MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgTt6OadouxxxSDg/0SZdOIBqtnFGKrpwmL+quEUf+hfSgCgYIKoEcz1UBgi2hRANCAAQGHNN2NO7btp+w1248yk98E0asGC8sG0bmIzdom4M0xp3vc4IfXjmZ8omUz4oVcjzAuyMSSpJM6uPLcU1SH4HZ"; String priKey = "MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgTt6OadouxxxSDg/0SZdOIBqtnFGKrpwmL+quEUf+hfSgCgYIKoEcz1UBgi2hRANCAAQGHNN2NO7btp+w1248yk98E0asGC8sG0bmIzdom4M0xp3vc4IfXjmZ8omUz4oVcjzAuyMSSpJM6uPLcU1SH4HZ";
InputStream inputStream = ResourceReader.class.getClassLoader().getResourceAsStream("test.txt"); InputStream inputStream = ResourceReader.class.getClassLoader().getResourceAsStream("config.properties");
if (inputStream != null) { if (inputStream != null) {
OpenSDK.init(inputStream, priKey); OpenSDK.init(inputStream, priKey);
String filePath = "a.txt"; try (FileOutputStream fos = new FileOutputStream("a.txt")) {
try (FileOutputStream fos = new FileOutputStream(filePath)) {
fos.write("123 测试".getBytes()); fos.write("123 测试".getBytes());
String res1 = OpenSDK.sendFile("", "open-filegateway",fos.toString()); String res1 = OpenSDK.sendFile("", "open-filegateway",fos.toString());
...@@ -62,6 +60,9 @@ public class TempBankController { ...@@ -62,6 +60,9 @@ public class TempBankController {
e.printStackTrace(); e.printStackTrace();
} }
} }
else{
log.info("文件不存在");
}
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论