# fisco-backend **Repository Path**: teddycode/fisco-backend ## Basic Information - **Project Name**: fisco-backend - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-27 - **Last Updated**: 2021-11-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FISCO-BCOS后端业务开发模版 #### 介绍 实验室区块链项目的后代基本框架代码,基于微BCOS区块链,整合了Springboot、SpringMVC、Mybatis、BCOS Web3SDK,可编写链上链下业务,初步实现了区块链网络参数获取的例子,以及基于SpringSecurity的用户权限管理模块。 #### 软件架构 ![](http://note.youdao.com/yws/public/resource/fdfb94398b07f829d3b5575168895cec/xmlnote/A0B14E6EDB294A878C591FF7B1657AD2/9117 "软件架构说明") #### 安装教程 1. 部署fisco集群,参考[FISCO部署网络教程](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/installation.html) 2. 安装jdk(版本8.0或以上) 3. 安装MySQL数据库(建议5.7) 4. 建议使用IDEA开发(学生邮箱可免费使用) #### 使用说明 ##### 配置区块链网络连接 1. SDK证书文件在node/{ip}/sdk目录下,将sdk.crt、sdk.key、ca.crt 复制到工程模版的resources文件夹下。 2. 在application-{your_name}.yaml修改节点配置信息,把节点IP改成自己区块链节点的IP ``` - group-id: 1 #group ID connections-str: - 202.193.60.222:20200 # node listen_ip:channel_listen_port - 202.193.60.222:20201 - group-id: 2 connections-str: - 202.193.60.222:20202 # node listen_ip:channel_listen_port - 202.193.60.222:20203 enabled: false ``` ##### 配置MySQL数据库连接 1. 在resource下将application.properties 的数据库配置更改成自己的数据库连接信息: ``` spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/srp?characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false spring.datasource.username=root spring.datasource.password=123456 ``` ##### IDEA配置项目 1. 安装插件 - lombok - [其他](https://blog.csdn.net/win7system/article/details/83508313) 2. 创建数据库 直接执行resource下的create_database.sql 3. 运行配置 配置IDEA SpringBoot,并运行本工程 4. 配置SpringSecurity 执行create_table_security.sql 4. 接口文档 swagger地址: 简版:http://localhost:8989/swagger-ui.html#/ 增强版:http:localhost:8989/doc.html #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request