File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1
1
# FabricJavaSDKExamples
2
2
Fabric JAVA SDK测试样例
3
+
4
+
5
+ ## 一、调用链码说明(不使用Fabric-CA模块)
6
+
7
+ ### 1.1 测试代码结构说明
8
+
9
+ ``` bash
10
+ ├── pom.xml
11
+ ├── src
12
+ │ ├── main
13
+ │ │ ├── java
14
+ │ │ │ └── ijarvis
15
+ │ │ │ └── intelliq
16
+ │ │ │ ├── FabricApp.java # 初始化Fabric Client对象以及连接组织信息
17
+ │ │ │ ├── LedgerRecord.java # 链码中数据结构Bean
18
+ │ │ │ └── SampleUser.java # 抽象超级账本中用户信息(实际就是MSP下user文件夹中生成的用户身份文件)
19
+ │ │ └── resources
20
+ │ │ └── log4j.xml
21
+ │ └── test
22
+ │ ├── java
23
+ │ │ └── ijarvis
24
+ │ │ └── intelliq
25
+ │ │ └── AppTest.java # Junit测试代码文件
26
+ │ └── resources
27
+ │ ├── crypto-config # 测试环境下所有证书以及MSP文件集合
28
+ │ │ ├── ordererOrganizations
29
+ │ │ │ └── example.com
30
+ │ │ └── peerOrganizations
31
+ │ │ ├── org1.example.com
32
+ │ │ └── org2.example.com
33
+ │ └── log4j.xml
34
+ ```
35
+
36
+ 由于调用链码调用初始化需要初始化` fhclient ` 等等一系列的对象,所以建议使用` Junit ` 运行代码。
37
+
38
+
39
+ ### 1.2、 核心代码说明
40
+
41
+ 使用` SDk ` 调用链码
42
+
43
+
44
+
45
+
46
+
47
+
48
+
You can’t perform that action at this time.
0 commit comments