Publish open source project - JYShortUrl

1. Project Introduction

    Introduction: https://gitee.com/LKWai/ShortURL

    JYShortUrl is an open source project that converts long links into short links, which can shorten links such as https://my.oschina.net/u/3637243/blog   to http://URL/aA (your domain name/1 -5-digit string) , which greatly simplifies the length of the domain name.

    Some friends will ask: Is there any use in simplifying the length of the domain name? A: In some blogs, such as Weibo, etc., there will be a limit on the length of characters you enter (seems to be 140 characters). If you want to share a connection with a length of forty or fifty characters, then send a wool thread.

    JYShortUrl is based on Spring Boot 1.4.7, and the return data type is Json. It can be used as a service provider or added to the front page with slight changes. Use swagger2 to generate API documentation and test the interface.

    Function:

    JYShortUrl provides swagger2 API documentation. For specific interface functions, please refer to the documentation.

    

    how to use:

    First download the project from the code cloud to the local. Before starting the project, you need to modify the following configurations. Open application.yml and you will see the following configuration information:

    mysql information is not explained. The URL is the domain name address applied for by your website. Create the following table in the MySQL database (I did some operations such as sharding and multi-master database (some are based on the capabilities provided by the PaaS cloud) , otherwise the generated short link data is about 2.2 billion, of course you can also generate Hundreds of thousands or millions for testing.)

    

    After configuring, start the project. Accessing /api/insertShortUrl in the Put method will insert data into your library (mine took more than 200 seconds to insert tens of millions of records, the specific optimization depends on you)

    2. Take a chestnut

    First, I use swagger2 to apply for a short link (which can be customized or randomly assigned by the system)

    The application is successful (if it fails or exists, a prompt message will be returned)

    Then I visit the short link of oe, and there are two ways to visit, one is to return the corresponding source address, and then the developer handles it by himself.

    One is to jump directly after accessing

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325441658&siteId=291194637