y0ngb1n

Aben Blog

欢迎来到我的技术小黑屋ヾ(◍°∇°◍)ノ゙
github

利用 Spring Boot & Redis 实现短链接服务

项目已托管于 GitHub:y0ngb1n/spring-boot-samples,欢迎 Star, Fork 😘


准备工作#

  • Spring Boot 2.1.0+
  • Redis
  • Lombok
  • Guava 28.0
  • Common Validator 1.6

添加依赖项#

pom.xml

application.yml

核心代码#

使用方式#

Step 0: 安装并启动 Redis

Step 1: 启动 url-shortener 服务

Step 2: 生成短链

Step 3: 还原短链

查看日志

参考资料#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.