fabric-sdk-java+ springBoot 简单invoke和query引用示例

上传者: 27348837 | 上传时间: 2021-05-03 10:10:47 | 文件大小: 125KB | 文件类型: ZIP
这是一个基于spingBoot的项目,通过此项目可以实现对fabric网络的简单调用,并且可以启动一个fabric网路的服务,直接在网页上调用.
搭建流程,首先需要fabric1.4的网络,
1进入-first-network目录,修改byfn.sh中COMPOSE_FILE=docker-compose-e2e.yaml
2,注释掉docker-compose-e2e-template.yaml,以及base目录下包含_TLS_ENABLED字段的配置,并启动网络,./byfn.sh up
3,将生成的crypto-config文件夹拷贝到:项目所在盘:/data/crypto-config
4,修改Config.java中的相关配置。
5,执行QueryChaincode.java,或是InvokeChaincode.java
6,启动web服务:执行DemoApplication.java
详细教程见: https://mp.csdn.net/postedit/88354838

文件下载

资源详情

[{"title":"( 59 个子文件 125KB ) fabric-sdk-java+ springBoot 简单invoke和query引用示例","children":[{"title":"demo","children":[{"title":".project <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"gradlew <span style='color:#111;'> 5.17KB </span>","children":null,"spread":false},{"title":"settings.gradle <span style='color:#111;'> 26B </span>","children":null,"spread":false},{"title":"users","children":[{"title":"org1","children":[{"title":"admin.ser <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":[{"title":"com","children":[{"title":"example","children":[{"title":"demo","children":[{"title":"DemoApplicationTests.java <span style='color:#111;'> 331B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"application.properties <span style='color:#111;'> 1B </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"example","children":[{"title":"demo","children":[{"title":"service","children":[{"title":"impl","children":[{"title":"FabricServiceImpl.java <span style='color:#111;'> 6.47KB </span>","children":null,"spread":false}],"spread":false},{"title":"FabricService.java <span style='color:#111;'> 107B </span>","children":null,"spread":false}],"spread":true},{"title":"controller","children":[{"title":"FabricController.java <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false}],"spread":false},{"title":"DemoApplication.java <span style='color:#111;'> 305B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"org","children":[{"title":"app","children":[{"title":"chaincode","children":[{"title":"invocation","children":[{"title":"InvokeChaincode.java <span style='color:#111;'> 4.18KB </span>","children":null,"spread":false},{"title":"InvokeQueryChaincode.java <span style='color:#111;'> 4.43KB </span>","children":null,"spread":false},{"title":"QueryChaincode.java <span style='color:#111;'> 3.20KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"client","children":[{"title":"FabricClient.java <span style='color:#111;'> 4.08KB </span>","children":null,"spread":false},{"title":"CAClient.java <span style='color:#111;'> 5.13KB </span>","children":null,"spread":false},{"title":"ChannelClient.java <span style='color:#111;'> 7.77KB </span>","children":null,"spread":false}],"spread":false},{"title":"util","children":[{"title":"Util.java <span style='color:#111;'> 5.03KB </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"Config.java <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false}],"spread":false},{"title":"user","children":[{"title":"RegisterEnrollUser.java <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"UserContext.java <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"CAEnrollment.java <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false}],"spread":false},{"title":"network","children":[{"title":"DeployInstantiateChaincode.java <span style='color:#111;'> 5.17KB </span>","children":null,"spread":false},{"title":"CreateChannel.java <span style='color:#111;'> 4.34KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 225B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 364B </span>","children":null,"spread":false},{"title":"org.springframework.ide.eclipse.prefs <span style='color:#111;'> 65B </span>","children":null,"spread":false},{"title":"com.genuitec.eclipse.migration.prefs <span style='color:#111;'> 117B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.prefs.xml <span style='color:#111;'> 172B </span>","children":null,"spread":false},{"title":"org.eclipse.buildship.core.prefs <span style='color:#111;'> 56B </span>","children":null,"spread":false}],"spread":true},{"title":"gradle","children":[{"title":"wrapper","children":[{"title":"gradle-wrapper.properties <span style='color:#111;'> 232B </span>","children":null,"spread":false},{"title":"gradle-wrapper.jar <span style='color:#111;'> 53.43KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".gradle","children":[{"title":"vcs-1","children":[{"title":"gc.properties <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true},{"title":"4.10","children":[{"title":"fileChanges","children":[{"title":"last-build.bin <span style='color:#111;'> 1B </span>","children":null,"spread":false}],"spread":true},{"title":"vcsMetadata-1","children":null,"spread":false},{"title":"fileHashes","children":[{"title":"fileHashes.bin <span style='color:#111;'> 18.16KB </span>","children":null,"spread":false},{"title":"fileHashes.lock <span style='color:#111;'> 17B </span>","children":null,"spread":false}],"spread":true},{"title":"gc.properties <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"gradlew.bat <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 277B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"test","children":[{"title":"com","children":[{"title":"example","children":[{"title":"demo","children":[{"title":"DemoApplicationTests.class <span style='color:#111;'> 622B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"main","children":[{"title":"application.properties <span style='color:#111;'> 1B </span>","children":null,"spread":false},{"title":"com","children":[{"title":"example","children":[{"title":"demo","children":[{"title":"service","children":[{"title":"impl","children":[{"title":"FabricServiceImpl.class <span style='color:#111;'> 8.27KB </span>","children":null,"spread":false}],"spread":false},{"title":"FabricService.class <span style='color:#111;'> 189B </span>","children":null,"spread":false}],"spread":false},{"title":"DemoApplication.class <span style='color:#111;'> 704B </span>","children":null,"spread":false},{"title":"controller","children":[{"title":"FabricController.class <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"org","children":[{"title":"app","children":[{"title":"chaincode","children":[{"title":"invocation","children":[{"title":"InvokeQueryChaincode.class <span style='color:#111;'> 6.43KB </span>","children":null,"spread":false},{"title":"InvokeChaincode.class <span style='color:#111;'> 6.62KB </span>","children":null,"spread":false},{"title":"QueryChaincode.class <span style='color:#111;'> 4.60KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"client","children":[{"title":"FabricClient.class <span style='color:#111;'> 4.82KB </span>","children":null,"spread":false},{"title":"ChannelClient.class <span style='color:#111;'> 9.55KB </span>","children":null,"spread":false},{"title":"CAClient.class <span style='color:#111;'> 4.54KB </span>","children":null,"spread":false}],"spread":false},{"title":"util","children":[{"title":"Util.class <span style='color:#111;'> 4.97KB </span>","children":null,"spread":false}],"spread":false},{"title":"config","children":[{"title":"Config.class <span style='color:#111;'> 2.70KB </span>","children":null,"spread":false}],"spread":false},{"title":"user","children":[{"title":"UserContext.class <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false},{"title":"CAEnrollment.class <span style='color:#111;'> 829B </span>","children":null,"spread":false},{"title":"RegisterEnrollUser.class <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false}],"spread":false},{"title":"network","children":[{"title":"CreateChannel.class <span style='color:#111;'> 5.43KB </span>","children":null,"spread":false},{"title":"DeployInstantiateChaincode.class <span style='color:#111;'> 6.67KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"build.gradle <span style='color:#111;'> 601B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • qq1678274383 :
    不好用,什么都没有
    2020-01-10

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明