# short-link **Repository Path**: qing2356/short ## Basic Information - **Project Name**: short-link - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-27 - **Last Updated**: 2025-03-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 1.1 简介 一个纯后端简单的短连接生成项目,并且可以做到短连接重定向,以下是使用postman的测试结果图 - 短链接生成 ![输入图片说明](https://foruda.gitee.com/images/1743061461421032755/b7bce57d_8562204.png "屏幕截图") - 短链接重定向 ![输入图片说明](https://foruda.gitee.com/images/1743061480004496500/6acbacbd_8562204.png "屏幕截图") ## 1.2 技术栈 使用到的技术栈包括SpringBoot+MyBatis+Redis+MySQL+雪花算法+base62编码 ## 1.3 流程图 ![输入图片说明](https://foruda.gitee.com/images/1743061505788141558/7c241558_8562204.png "屏幕截图") ## 1.4 配置项目 如果想要使用这个项目的话,请注意以下几个问题 1. 先创建数据库中的数据表 ``` -- auto-generated definition create table tb_url_mapping ( url_id bigint primary key auto_increment comment '主键', origin_url varchar(300) not null comment '原始长链接', origin_url_md5 varchar(32) not null comment '长链接md5值', tiny_url varchar(11) not null comment '短链接', url_type int(1) default 0 not null comment '是系统自动生成还是自定义的短链接类型,系统: “system”,自定义: “custom” 0为system,1为custom 缺省为0', create_time timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '生成时间', update_time timestamp default CURRENT_TIMESTAMP not null comment '最后更新时间', constraint tb_url_mapping_origin_url_md5_uindex unique (origin_url_md5), constraint tb_url_mapping_tiny_url_uindex unique (tiny_url) ); ``` 2. 配置文件中的数据库配置,以及缓存配置修改为自己的 ## 1.5 博客地址 https://blog.csdn.net/weixin_43866613/article/details/146552159?fromshare=blogdetail&sharetype=blogdetail&sharerId=146552159&sharerefer=PC&sharesource=weixin_43866613&sharefrom=from_link ## 1.6 参考项目 https://gitee.com/darkranger/tiny-url.git