代码生成器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

98 lines
2.5 KiB

# 代码生成器配置文件
generator:
# 基础配置
basic:
author: "科技小王子"
version: "1.0.0"
encoding: "UTF-8"
# 数据库配置
datasource:
url: "jdbc:mysql://47.119.165.234:3308/modules?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai"
driver: "com.mysql.cj.jdbc.Driver"
username: "modules"
password: "8YdLnk7KsPAyDXGA"
# 输出配置
output:
# 后端代码输出路径
backend:
base-path: "./output/backend"
java-path: "/src/main/java"
resources-path: "/src/main/resources"
# 前端代码输出路径
frontend:
vue-path: "./output/frontend/vue"
uniapp-path: "./output/frontend/uniapp"
react-path: "./output/frontend/react"
# 包名配置
package:
base: "com.generator"
modules:
- name: "system"
description: "系统管理模块"
- name: "business"
description: "业务模块"
# 模板配置
templates:
# 后端模板
backend:
framework: "spring-boot" # spring-boot, spring-cloud, quarkus
orm: "mybatis-plus" # mybatis-plus, jpa, mybatis
security: "spring-security" # spring-security, shiro, none
# 前端模板
frontend:
framework: "vue3" # vue3, vue2, react, angular
ui: "ant-design" # ant-design, element-plus, naive-ui
language: "typescript" # typescript, javascript
# 代码生成选项
generation:
# 是否覆盖已存在文件
override-existing: false
# 是否生成注释
generate-comments: true
# 是否生成Swagger注解
generate-swagger: true
# 是否生成权限注解
generate-auth: true
# 是否生成操作日志
generate-log: true
# 是否生成单元测试
generate-tests: false
# 字段处理配置
field-config:
# 排除的查询字段
exclude-query-fields:
- "tenant_id"
- "create_time"
- "update_time"
- "deleted"
# 转换为String类型的字段
string-type-fields:
- "Date"
- "LocalDate"
- "LocalTime"
- "LocalDateTime"
# 使用EQ查询的字段类型
eq-query-types:
- "Integer"
- "Boolean"
- "BigDecimal"
# 表配置
table-config:
# 表前缀(生成时会去除)
table-prefix:
- "tb_"
- "sys_"
# 需要生成的表(为空则生成所有表)
include-tables: []
# 排除的表
exclude-tables:
- "flyway_schema_history"
- "sys_log"