# iot-cloud **Repository Path**: coder-lida/iot-cloud ## Basic Information - **Project Name**: iot-cloud - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-19 - **Last Updated**: 2024-03-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Coverage Status Downloads Downloads

## 快速开始 ### 一、核心依赖 | 依赖 | 版本 | |-----------------------------|------------| | Spring Boot | 3.2.3 | | Spring Cloud | 2023.0.0 | | Spring Cloud Alibaba | 2022.0.0.0 | | Spring Authorization Server | 1.2.2 | | Mybatis Plus | 3.5.5 | ### 二、模块说明 ```lua iot-ui -- https://e.coding.net/honghuzl/iot_cloud/iot-ui.git iot -- https://e.coding.net/honghuzl/iot_cloud/iot.git ├ ├── iot-auth -- 授权服务提供[3000] └── iot-common -- 系统公共模块 ├── iot-common-bom -- 全局依赖管理控制 ├── iot-common-core -- 公共工具类核心包 ├── iot-common-datasource -- 动态数据源包 ├── iot-common-excel -- excel处理 ├── iot-common-log -- 日志服务 ├── iot-common-oss -- 文件上传工具类 ├── iot-common-mybatis -- mybatis 扩展封装 ├── iot-common-seata -- 分布式事务 ├── iot-common-security -- 安全工具类 ├── iot-common-swagger -- 接口文档 ├── iot-common-feign -- feign 扩展封装 └── iot-common-xss -- xss 安全封装 ├── iot-gateway -- Spring Cloud Gateway网关[9999] └── iot-platform -- 平台模块 └── iot-platform-api -- 平台api模块 └── iot-platform-biz -- 平台业务处理模块[3002] └── iot-upms -- 权限管理模块 └── iot-upms-api -- 权限管理api模块 └── iot-upms-biz -- 权限管理业务处理模块[3001] └── iot-register -- Nacos Server[8848] └── iot-visual └── iot-monitor -- 服务监控 [4001] ├── iot-codegen -- 图形化代码生成 [4002] └── iot-quartz -- 定时任务管理台 [4003] ``` ### 三、本地开发 运行 #### 1、下载服务端代码 ``` git clone https://e.coding.net/honghuzl/iot_cloud/iot.git ``` #### 2、配置本地hosts ``` 127.0.0.1 iot-register 127.0.0.1 iot-gateway 127.0.0.1 iot-redis 127.0.0.1 iot-mysql 127.0.0.1 iot-platform 127.0.0.1 iot-sentinel 127.0.0.1 iot-monitor 127.0.0.1 iot-seata 127.0.0.1 iot-job ``` #### 3、初始化数据库 >● 版本: mysql5.7.8+ > >● 默认字符集: utf8mb4 > >● 默认排序规则: utf8mb4_general_ci ``` 核心数据库: iot/db/hhzl_iot.sql nacos配置: iot/db/hhzl_iot_config.sql 代码生成脚本: iot/db/hhzl_iot_codegen.sql ``` #### 4、配置文件修改 ``` # nacos配置文件修改为本地数据库地址 iot/iot-register/src/main/resources/application.yml db: num: 1 user: ${MYSQL-USER:root} #修改:用户名 password: ${MYSQL-PWD:root} #修改:密码, 特殊字符使用 '包裹' url: 0: jdbc:mysql://${MYSQL-HOST:iot-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:hhzl_iot_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true ``` #### 5、启动顺序 - 必须启动的服务 ``` 1. iot-register/IotNacosApplication.java 2. iot-auth/IotAuthApplication.java 3. iot-upms-biz/IotAdminApplication 4. iot-gateway/IotGatewayApplication.java 5. iot-platform/IotPlatformApplication.java ``` - 其他功能服务 ``` 6. iot-tdengine/IotTDengineApplication 7. iot-codegen/IotCodeGenApplication 8. iot-monitor/IotMonitorApplication 9. iot-quartz/IotSentinelApplication ``` #### 6、下载前端UI ``` git clone https://e.coding.net/honghuzl/iot_cloud/iot-ui.git ``` #### 7、安装依赖 ``` # 检查node版本 v16.17.1 node -v v16.17.1 cd iot-ui && npm install -g cnpm --registry=https://registry.npm.taobao.org cnpm install ``` #### 8、启动前端 ``` npm run dev ``` ### 四、Docker 运行 #### 1、下载服务端代码 ``` git clone https://e.coding.net/honghuzl/iot_cloud/iot.git ``` #### 2、启动服务端 ``` cd iot && mvn clean install && docker-compose up -d ``` #### 3、下载前端UI ``` git clone https://e.coding.net/honghuzl/iot_cloud/iot-ui.git ``` #### 4、安装依赖 ``` cd iot-ui && npm install -g cnpm --registry=https://registry.npm.taobao.org cnpm install ``` #### 5、启动前端 ``` cnpm run build:docker && cd docker && docker-compose up -d ``` ## 开发规范及工具使用 https://1m29n3lr67.k.topthink.com/@8lrxg5kq24/SQLkaifaguifan.html ## 日常开发运维 https://1m29n3lr67.k.topthink.com/@xo2e7n97rj/docker.html ## **Commit message 格式** 为了方便使用,我们避免了过于复杂的规定,格式较为简单且不限制中英文: ``` (): // 空一行 // 空一行 // 注意冒号 : 后有空格 // 如 feat(miniprogram): 增加了小程序模板消息相关功能 ``` 大致分为两个个部分: 1. 标题行: 包括` (): ` 2. 主题内容: 描述了为什么修改,做了什么修改,以及开发思路等 | 标识 | 说明 | 必填 | | ------- | ---------------------- | ------ | | type | 修改类型 | 必填 | | scope | 作用范围 | 非必填 | | subject | 对commit的简单描述 | 必填 | | body | 本次 commit 的详细描述 | 非必填 | ### **1.type** ``` feat:新功能(feature) fix:修补bug docs:文档(documentation) style: 格式(不影响代码运行的变动) refactor:重构(即不是新增功能,也不是修改bug的代码变动) test:增加测试 chore:构建过程或辅助工具的变动 ``` 如果type为feat和fix,则该 commit 将肯定出现在 Change log 之中。其他情况(docs、chore、style、refactor、test)由你决定,要不要放入 Change log,建议是不要。 ### **2.scope** scope用于说明 commit 影响的范围,比如数据层、控制层、视图层等等,视项目不同而不同。 ### **3. subject** subject是 commit 目的的简短描述,不超过50个字符。 ``` 以动词开头,使用第一人称现在时,比如change,而不是changed或changes 第一个字母小写 结尾不加句号(.) ``` ### **4. body** Body 部分是对本次 commit 的详细描述,可以分成多行。描述为什么修改, 做了什么样的修改, 以及开发的思路等等