站点更新:2019-12-12 17:59:40

This commit is contained in:
ehlxr 2019-12-12 17:59:40 +08:00
parent 84159a12e2
commit 1759c923ec
5 changed files with 34 additions and 49 deletions

12
pom.xml
View File

@ -19,7 +19,7 @@
<file_encoding>utf-8</file_encoding>
<jdk.verion>1.8</jdk.verion>
<powermock.version>1.7.1</powermock.version>
<kotlin.version>1.2.60</kotlin.version>
<kotlin.version>1.3.61</kotlin.version>
</properties>
<dependencies>
@ -264,11 +264,11 @@
<artifactId>jodd-props</artifactId>
<version>3.6.1</version>
</dependency>
<dependency>
<groupId>cn.ceres.did</groupId>
<artifactId>did-sdk</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>cn.ceres.did</groupId>-->
<!-- <artifactId>did-sdk</artifactId>-->
<!-- <version>1.0-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>cn.enncloud.ceres</groupId>
<artifactId>ceres</artifactId>

BIN
resources/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,29 +1,29 @@
package me.ehlxr;
import cn.ceres.did.client.SdkClient;
import cn.ceres.did.sdk.SdkProto;
import java.util.concurrent.CountDownLatch;
/**
* @author ehlxr
*/
public class DidSdkTest {
public static void main(String[] args) throws Exception {
SdkClient client = new SdkClient("10.19.248.200", 30581);
// SdkClient client = new SdkClient();
client.init();
client.start();
// client.invokeOneWay(new SdkProto(), 2000);
// System.out.println(client.invokeSync(new SdkProto(), 2000).getDid());
CountDownLatch countDownLatch = new CountDownLatch(1);
client.invokeAsync(new SdkProto(), 2000, responseFuture -> {
System.out.println(responseFuture.getSdkProto().getDid());
countDownLatch.countDown();
});
countDownLatch.await();
client.shutdown();
}
}
//
// import cn.ceres.did.client.SdkClient;
// import cn.ceres.did.sdk.SdkProto;
//
// import java.util.concurrent.CountDownLatch;
//
// /**
// * @author ehlxr
// */
// public class DidSdkTest {
//
// public static void main(String[] args) throws Exception {
// SdkClient client = new SdkClient("10.19.248.200", 30581);
// // SdkClient client = new SdkClient();
// client.init();
// client.start();
//
// // client.invokeOneWay(new SdkProto(), 2000);
// // System.out.println(client.invokeSync(new SdkProto(), 2000).getDid());
// CountDownLatch countDownLatch = new CountDownLatch(1);
// client.invokeAsync(new SdkProto(), 2000, responseFuture -> {
// System.out.println(responseFuture.getSdkProto().getDid());
// countDownLatch.countDown();
// });
// countDownLatch.await();
// client.shutdown();
// }
// }

View File

@ -1,15 +0,0 @@
package me.ehlxr
/**
* Created by lixiangrong on 2018/8/17.
*/
fun main(args: Array<String>) {
val strList = listOf("a", "ab", "abc","abcd","abcde","abcdef","abcdefg")
// 非常好用的流式 API filterflatmap 等等
strList.forEach{str->
run {
str.length
println(str)
}
}
}