Reduce:一款开源的短网址平台!!【送源码】
今天给大家介绍一款开源的短网址平台,Coody Framework首秀,自写IOC、MVC、ORM、TASK、JSON、DB连接池、服务器。百毫秒启动,全项目仅2.5M(低配服可运行)。
前端采用Amaze UI,后端采用Coody Framework MVC,数据库采用H2DB
基本使用
导入Maven项目,运行访问即可
也可以Maven Install 构建Jar包,丢服务器java -jar 运行。记得配置数据库。
更换数据库
有好几位朋友来问我换mysql,介绍下换成mysql的方案
1、引入mysql驱动(根据你mysql版本来)
<dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>8.0.18</version>
</dependency>
2、修改配置
coody.bean.dataSource.class=org.coody.framework.esource.ESource
coody.bean.dataSource.field.driver=com.mysql.jdbc.Driver
coody.bean.dataSource.field.url=jdbc\:mysql\://localhost:3306/reduce?useUnicode\=true&characterEncoding\=UTF-8&serverTimezone=GMT%2B8
coody.bean.dataSource.field.user=reduce
coody.bean.dataSource.field.password=Coody888!
coody.bean.dataSource.field.maxPoolSize=64
coody.bean.dataSource.field.minPoolSize=2
coody.bean.dataSource.field.initialPoolSize=5
3、导入数据表
CREATE TABLE `short_info` (`id` bigint(32) NOT NULL AUTO_INCREMENT,`frequency` bigint(32) NOT NULL DEFAULT 0,`status` tinyint(4) DEFAULT '1',`appId` int(11) DEFAULT NULL,`userId` int(11) DEFAULT NULL,`url` varchar(255) DEFAULT NULL,`createTime` datetime DEFAULT CURRENT_TIMESTAMP,PRIMARY KEY (`id`)
);
CREATE TABLE `user_info` (`id` int(11) NOT NULL AUTO_INCREMENT,`email` varchar(32) DEFAULT NULL,`password` varchar(40) DEFAULT NULL,`status` tinyint(4) DEFAULT '1',`createTime` datetime DEFAULT CURRENT_TIMESTAMP,PRIMARY KEY (`id`) ,UNIQUE KEY `email_uk` (`email`) USING BTREE
) ;
CREATE TABLE `app_info` (`id` int(11) NOT NULL AUTO_INCREMENT,`name` varchar(32) DEFAULT NULL,`userId` int(11) DEFAULT NULL,`unionId` varchar(32) DEFAULT NULL,`createTime` datetime DEFAULT CURRENT_TIMESTAMP,`status` int(2) DEFAULT '0',PRIMARY KEY (`id`) ,UNIQUE KEY `app_uk` (`unionId`) USING BTREE
) ;
CREATE TABLE `email_queue` (`id` bigint(32) NOT NULL AUTO_INCREMENT,`unionId` varchar(32) DEFAULT NULL,`title` varchar(128) DEFAULT NULL,`context` varchar(256) DEFAULT NULL,`targeEmail` varchar(32) DEFAULT NULL,`status` int(2) DEFAULT '0',`createTime` datetime DEFAULT CURRENT_TIMESTAMP,`millisecond` bigint(32) DEFAULT NULL,`updateTime` datetime DEFAULT CURRENT_TIMESTAMP,PRIMARY KEY (`id`)
)
然后就可与愉快的使用MYSQL了
界面预览
开源地址
https://gitee.com/coodyer/reduce
——EOF——
福利:
扫码回复【酒店】可免费领取酒店管理系统源码