使用docker下载镜像
docker pull tanghc2020/gen
启动命令
docker run --name gen --restart=always -p 6969:6969 -d tanghc2020/gen
启动后页面
请求地址 http://localhost:6969/#/dashboard
sql 脚本
CREATE DATABASE IF NOT EXISTS `gen` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
USE `gen`;
-- test.datasource_config definition
CREATE TABLE `datasource_config` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`db_type` int(11) NOT NULL DEFAULT '0' COMMENT '数据库类型,1:MySql, 2:Oracle, 3:sqlserver',
`driver_class` varchar(64) DEFAULT '' COMMENT '数据库驱动',
`db_name` varchar(64) NOT NULL DEFAULT '' COMMENT '数据库名称',
`host` varchar(64) NOT NULL DEFAULT '' COMMENT '数据库host',
`port` int(11) NOT NULL DEFAULT '0' COMMENT '数据库端口',
`username` varchar(64) NOT NULL DEFAULT '' COMMENT '数据库用户名',
`password` varchar(64) NOT NULL DEFAULT '' COMMENT '数据库密码',
`is_deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否已删除,1:已删除,0:未删除',
`package_name` varchar(100) DEFAULT NULL,
`del_prefix` varchar(200) DEFAULT NULL,
`group_id` int(11) DEFAULT NULL,
`schema_name` varchar(100) DEFAULT NULL,
`author` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='数据源配置表';
-- test.generate_history definition
CREATE TABLE `generate_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`config_content` text,
`md5_value` varchar(64) DEFAULT NULL,
`generate_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
-- test.template_config definition
CREATE TABLE `template_config` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL DEFAULT '' COMMENT '模板名称',
`file_name` varchar(128) NOT NULL DEFAULT '' COMMENT '文件名称',
`content` text NOT NULL COMMENT '内容',
`is_deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否删除,1:已删除,0:未删除',
`group_id` int(11) DEFAULT NULL,
`group_name` varchar(100) DEFAULT NULL,
`folder` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='代码生成-模板表';
-- test.template_group definition
CREATE TABLE `template_group` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`group_name` varchar(100) DEFAULT NULL COMMENT '组',
`is_deleted` int(11) DEFAULT '0' COMMENT '删除状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='代码生成-模板组表';
INSERT INTO template_group (group_name,is_deleted) VALUES
('default-mybatis',0),
('mybatis-plus-2.0',0),
('mybatis-plus-3.0',0),
('mybatis-plus-3.0-api',0),
('mybatis-3.0-api-domain',0);
INSERT INTO datasource_config (db_type,driver_class,db_name,host,port,username,password,is_deleted,package_name,del_prefix,group_id,schema_name,author) VALUES
(1,'com.mysql.cj.jdbc.Driver','ecc-dev','99.99.9.99',3306,'root','root',0,'com.hailiang.ecs','',6,'','ecs');