# enfi-cli-server **Repository Path**: zpyoki/enfi-cli-server ## Basic Information - **Project Name**: enfi-cli-server - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-18 - **Last Updated**: 2022-06-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## enfi-modules-example 使用说明 * 本后端框架负责业务模块的开发 * 父工程 com.enfi:enfi-cloud:1.0 其中管理了大部分常用依赖版本,缺失的自行添加 * 公共部分的依赖需连接内网到私服进行下载,若无法连接内网,将dependencies目录下的内容解压到本地maven仓库中 * 可通过修改 pom.xml 中的profiles activeByDefault 来选择使用不同环境的配置文件,连接本地开发环境时,local设置为true,修改resource-filter/local/bootstrap.yml 的nacos配置 ## 本地部署基础服务说明 ### 系统模块 ~~~ com.enfi.cloud ├── enfi-gateway // 网关模块 [8080] ├── enfi-auth // 认证中心 [9200] ├── enfi-modules-system // 系统模块 [9201] ~~~ ### 本地环境部署 1. 创建数据库enfi-cloud并导入数据脚本sql/enfi-cloud.sql(必须) 2. 创建数据库enfi-config并导入数据脚本sql/enfi_config.sql(必须) 3. 配置nacos持久化,修改nacos-server包conf/application.properties文件,增加支持mysql数据源配置(必须) 4. nacos启动后修改各个模块配置文件中mysql配置以及redis配置 5. 连接内网服务时,需在resources-filter/dev.yml中配置ip,内网环境配置本机ip即可,vpn连接内网时配置vpn连接后的ip ```properties # conf/application.properties # db mysql spring.datasource.platform=mysql db.num=1 db.url.0=jdbc:mysql://localhost:3306/enfi-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC db.user=root db.password=password ``` ### 基础模块运行 1. 运行前优先启动nacos和redis服务 2. 优先启动 enfi-auth 模块 3. 再启动 enfi-gateway 模块,因为 gateway 在启动时会向 auth 请求公钥 4. enfi-modules-system 无顺序要求,只要启动即可