##Spring Fabric Demo
This demo is updated by using Hyperledger Fabric v2.3.2 Network now.
./bootstrap.sh 2.3.2 1.5.0 -s
If you still use Fabric 1.4.x network, please check out branch 1.0.6.
open Terminal and go to test-network
folder.
then run command:
i. Build Network with channel
./network.sh up createChannel -c mychannel -s couchdb
ii. Deploy chaincode
./network.sh deployCC -ccn mycc -ccv 1.0 -ccp ../src/chaincode/common -ccl go
iii. Deploy Java chaincode
./network.sh deployCC -ccn commoncc -ccv 1.0 -ccp ../src/chaincode-java -ccl java
Run io.github.ecsoya.demo.network.NetworkGenerator
in src/main/test
folder.
you will get 2 network config files in src/main/resources/network
folder
connection-org1.yml
and
connection-org2.yml
QA: Why to using custom NetworkGenerator?
Yes, after build your network by using test-network script files, you will find these 2 files connection-org1.yml
and connection-org2.yml
under organizations/peerOrganizations/org1.example.com
and organizations/peerOrganizations/org2.example.com
folder.
Firstly, these files does not contain the user identity (admin certificate...) to access wallet. Secondly, these files does not mapping the DNS to IP correctly.
spring:
mvc:
locale: zh_CN
locale-resolver: fixed
fabric:
chaincode:
identify: mycc
name: Common Chaincode
version: 1.0
channel: mychannel
peers: 2
organizations:
- Org1
- Org2
name: Common Fabric Network
gateway:
wallet:
identify: admin
network:
file: network/connection-org1.yml
name: example-fabric
# Fabric explorer
explorer:
title: Fabric Explorer
# logo: img/logo.png
copyright: Ecsoya ([email protected])
hyperledger-explorer-url: http://www.hyperleder.org
path: /explorer
Run DemoApplication
then open http://localhost:8080/explorer to view the fabric explorer.
Clone to gitee.com