2.4 KiB
2.4 KiB
orion-ops-pro (orion-ops重构版)
开发中
项目结构
orion-ops-pro 仓库主目录
orion-ops-dependencies 依赖模块 项目依赖版本的统一管理
orion-ops-framework 架构模块 包含了项目所有的配置
orion-ops-launch 启动模块 项目主容器用于服务的启动
orion-ops-module-asset 资产模块
orion-ops-module-infra 基建模块
orion-ops-ui 前端代码
sql脚本
orion-ops-pro
- sql
- init-schema.sql (初始化表结构)
- init-data.sql (初始化数据, 用户, 角色, 菜单)
- 常用.sql (创建基本表结构)
本地启动
在 release 1.0.0 之前不准备发布 orion-kit 1.0.6
需要开发者在本地拉取 orion-kit/dev 并且手动构建
https://gitee.com/lijiahangmax/orion-kit
# 构建 orion-kit
切换 dev 分支
mvn clean install -U -DskipTests
# 配置后端
修改 application-dev.yaml 的 mysql, redis 配置
# 启动后端
orion-ops-launch
IDEA 启动 com.orion.ops.launch.LaunchApplication
# 启动前端
orion-ops-ui
npm i
npm run dev
代码生成器
生成通用 controller entity service dao api convert http vue ts sql junit
代码位置
com.orion.ops.framework.mybatis.core.generator.CodeGenerators
// 生成的表为 system_role, 业务注释为 '角色', 业务包为 role
Template.create("system_role", "角色", "role")
// 生成 api
.enableProviderApi()
// 不生成单元测试
.disableUnitTest()
// 生成缓存
.cache("user:role", "角色缓存")
// 缓存过期时间 1 DAY
.expire(1, TimeUnit.DAYS)
// 生成 vue 文件, 一级业务包为 user, 二级业务包为 role (前端命名只能使用脊柱命名法)
.vue("user", "role")
// 前端使用抽屉表单 (多字段使用)
.enableDrawerForm()
// 前端支持多选
.enableRowSelection()
// 枚举下拉框 替换的字段为 'type'
.enums("type")
// 枚举值为 APP HOST
.names("APP", "HOST")
// 设置参数为 label APP.label = '应用' HOST.label = '主机'
.values("label", "应用", "主机")
// 设置参数为 value APP.value = '1' HOST.value = '2'
.values("value", 1, 2)
// 设置参数为 color APP.color = 'blue' HOST.color = 'green'
.color("blue", "green")
.build();