当前位置:网站首页>自动生成代码器推荐-code-gen
自动生成代码器推荐-code-gen
2022-08-02 12:49:00 【阿提说说】
一、简介
- 名称:code-gen
- 类型:代码生成工具
- 官网地址:https://gitee.com/durcframework/code-gen?_from=gitee_search
- 简要说明:一款代码生成工具,可自定义模板生成不同的代码,支持MySQL、Oracle、SQL Server、PostgreSQL。
二、解决的问题
支持多数据源,支持自定义模板,提供了通用的实体类、mybatis接口、mybatis配置文件模板,可以快速开发mybatis应用。
三、使用说明/实操使用案例
自主构建
需要安装Maven3,Java8
自动构建[推荐]:
Mac/Linux系统可直接执行build.sh进行构建,构建结果在dist/gen文件夹下。手动构建:
前提:安装nodejs,Java8,maven3cd front
执行npm install --registry=https://registry.npm.taobao.org
执行npm run build:prod
cd ..
执行mvn clean package
,在gen/target
下会生成一个gen-1.0.0-SNAPSHOT.jar
(xx表示本号)
将gen-1.0.0-SNAPSHOT.jar
放在dist/gen
下,确保jar和view在同一目录
执行java -jar gen-xx-SNAPSHOT.jar
浏览器访问http://localhost:6969/
构建多平台
安装多平台buildx :docker buildx create --use --name m1_builder
查看并启动 builder 实例:docker buildx inspect --bootstrap
一次打包多平台镜像并推送
打包多平台镜像并推送:docker buildx build -t tanghc2020/gen --platform=linux/amd64,linux/arm64/v8 . --push
或打包保存在本地
打包x64平台镜像在本地:docker buildx build -t tanghc2020/gen --platform=linux/amd64 -o type=docker
打包arm64平台镜像在本地:docker buildx build -t tanghc2020/gen --platform=linux/arm64/v8 -o type=docker
快速运行:docker run -d -p 6969:6969 tanghc2020/gen
四、缺点和不足
需要本地部署,命令启动,而不是整体客户端的形式,不能双击启动,不太友好
五、总结
整体结构清晰,能自定义模板,自定义多数据源,这两个特点非常好
边栏推荐
猜你喜欢
消除气泡解救蘑菇h5小游戏源码
Four seasons of trees realized by svg
How to better assess credit risk?Just watch this scorecard model live
SQL Server 2019 installation error 0 x80004005 service there is no timely response to the start or control request a detailed solution
JS中的闭包
qt 编译报错 No rule to make target
数据湖(二):什么是Hudi
FreeRTOS创建任务--动态创建、静态创建
LeetCode_377_Combination Sum IV
Openlayers 快速上手教程
随机推荐
ssm访问数据库数据报错
sql concat() function
kvm部署
How to use the database like tap water?|Tencent Cloud Database TDSQL-C
Intouch System Platform IDE-1
Data Lake (2): What is Hudi
最小割和对偶图(未完成)
MyCat2 introduction and installation and basic use
SQL Server如何建表
Object.entries()
FreeRTOS--stack experiment
FreeRTOS--优先级实验
svg balloon rises explosion js special effect
图神经网络(GNN)的简介「建议收藏」
The 7 most commonly used data analysis thinking, solve 95% of the analysis problems
OpenFeign设置header的3种方式
0801~面试题梳理
FreeRTOS实验--一个函数创建多个任务
Technology sharing | Description of the electronic fence function in the integrated dispatching system
pytorch model to tensorflow model