站点更新:2019-12-12 17:59:40
This commit is contained in:
parent
84159a12e2
commit
1759c923ec
12
pom.xml
12
pom.xml
@ -19,7 +19,7 @@
|
|||||||
<file_encoding>utf-8</file_encoding>
|
<file_encoding>utf-8</file_encoding>
|
||||||
<jdk.verion>1.8</jdk.verion>
|
<jdk.verion>1.8</jdk.verion>
|
||||||
<powermock.version>1.7.1</powermock.version>
|
<powermock.version>1.7.1</powermock.version>
|
||||||
<kotlin.version>1.2.60</kotlin.version>
|
<kotlin.version>1.3.61</kotlin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -264,11 +264,11 @@
|
|||||||
<artifactId>jodd-props</artifactId>
|
<artifactId>jodd-props</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.ceres.did</groupId>
|
<!-- <groupId>cn.ceres.did</groupId>-->
|
||||||
<artifactId>did-sdk</artifactId>
|
<!-- <artifactId>did-sdk</artifactId>-->
|
||||||
<version>1.0-SNAPSHOT</version>
|
<!-- <version>1.0-SNAPSHOT</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.enncloud.ceres</groupId>
|
<groupId>cn.enncloud.ceres</groupId>
|
||||||
<artifactId>ceres</artifactId>
|
<artifactId>ceres</artifactId>
|
||||||
|
BIN
resources/.DS_Store
vendored
Normal file
BIN
resources/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
resources/idea/goland-settings.zip
Normal file
BIN
resources/idea/goland-settings.zip
Normal file
Binary file not shown.
@ -1,29 +1,29 @@
|
|||||||
package me.ehlxr;
|
package me.ehlxr;
|
||||||
|
//
|
||||||
import cn.ceres.did.client.SdkClient;
|
// import cn.ceres.did.client.SdkClient;
|
||||||
import cn.ceres.did.sdk.SdkProto;
|
// import cn.ceres.did.sdk.SdkProto;
|
||||||
|
//
|
||||||
import java.util.concurrent.CountDownLatch;
|
// import java.util.concurrent.CountDownLatch;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* @author ehlxr
|
// * @author ehlxr
|
||||||
*/
|
// */
|
||||||
public class DidSdkTest {
|
// public class DidSdkTest {
|
||||||
|
//
|
||||||
public static void main(String[] args) throws Exception {
|
// public static void main(String[] args) throws Exception {
|
||||||
SdkClient client = new SdkClient("10.19.248.200", 30581);
|
// SdkClient client = new SdkClient("10.19.248.200", 30581);
|
||||||
// SdkClient client = new SdkClient();
|
// // SdkClient client = new SdkClient();
|
||||||
client.init();
|
// client.init();
|
||||||
client.start();
|
// client.start();
|
||||||
|
//
|
||||||
// client.invokeOneWay(new SdkProto(), 2000);
|
// // client.invokeOneWay(new SdkProto(), 2000);
|
||||||
// System.out.println(client.invokeSync(new SdkProto(), 2000).getDid());
|
// // System.out.println(client.invokeSync(new SdkProto(), 2000).getDid());
|
||||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
// CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||||
client.invokeAsync(new SdkProto(), 2000, responseFuture -> {
|
// client.invokeAsync(new SdkProto(), 2000, responseFuture -> {
|
||||||
System.out.println(responseFuture.getSdkProto().getDid());
|
// System.out.println(responseFuture.getSdkProto().getDid());
|
||||||
countDownLatch.countDown();
|
// countDownLatch.countDown();
|
||||||
});
|
// });
|
||||||
countDownLatch.await();
|
// countDownLatch.await();
|
||||||
client.shutdown();
|
// client.shutdown();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
@ -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 filter,flat,map 等等
|
|
||||||
strList.forEach{str->
|
|
||||||
run {
|
|
||||||
str.length
|
|
||||||
println(str)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user