在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:spring-fabric-gateway开源软件地址:https://gitee.com/ecsoya/spring-fabric-gateway开源软件介绍:Spring Fabric GatewayProvided Spring MVC services and spring boot starters based on fabric-gateway-java, more info can be found from https://ecsoya.github.io/fabric/(中文). Dependencies
Springboot Starters
How to useSpring Boot Configure:Firstly, add the following dependency to your project's <dependency> <groupId>io.github.ecsoya</groupId> <artifactId>fabric-gateway-spring-boot-starter</artifactId> <version>${latest_version}</version></dependency> or <dependency> <groupId>io.github.ecsoya</groupId> <artifactId>fabric-explorer-spring-boot-starter</artifactId> <version>${latest_version}</version></dependency> Snapshots <repositories> <repository> <id>ecsoya.io</id> <url>https://repo.rdc.aliyun.com/repository/42210-snapshot-BITvCn/</url> </repository></repositories> step1 <repositories> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository></repositories> step2 <dependency> <groupId>com.github.ecsoya.spring-fabric-gateway</groupId> <artifactId>spring-fabric-gateway</artifactId> <version>${latest_version}</version></dependency> Secondly, configure fabric network in # Fabric Network Configure spring: fabric: chaincode: identify: your chaincode id name: Common chaincode version: 1.0 channel: your channel name organizations: - org1 - org2 name: your fabric network name gateway: wallet: identify: admin network: file: network/connection.yml //your fabric network config file. name: fabric network name# Fabric explorer explorer: title: Fabric Explorer logo: img/logo.png copyright: Ecsoya ([email protected]) hyperledger-explorer-url: http://www.hyperleder.org Finally, enjoy to use the following spring components:
@Autowiredprivate FabricContext fabricContext; Fabric Network Config FileThe Please look at the You can also look at my project Fabric Network Builder to learn how to create a fabric network config file. Default common chaincodeThe default common chaincode provided useful functions such as The chaincode source can be found from here. Fabric Explorer StarterThis will help you to build a simple fabric explorer with few codes. References |
请发表评论