When I tested insert method today, I found some mistakes:

Looks like my sql is okay:
==> Preparing: INSERT INTO user(user_id,username,password,age,gender,phone,QQ,email,portrait,authority,status,integral) VALUE(?,?,?,?,?,?,?,?,?,?,?,?)
==> Parameters: 359522221443518464 (Long), Coconut Milk Sugar 5 (String), 123456 (String), 14 (Integer), 1 (Integer), 13988888888 (String), 1027740945 (String), 1027740945@qq.com (String), http://www.aliyouth.cn/repository/Image/epng (String), 1 (Integer), 0 (Long)

Looking at the error message was repeated by my username, but it wasn't really meant to say that (laughter). Recovery of the error scenario failed.~~

The real story is that today an algorithm called SnowFlake was found to generate long integer values with unique identifiers, like this:

D:\IDEInstall\jdk1.8\bin\java "-javaagent:D:\Software Installation Office\IntelliJ_IDEA\IntelliJ IDEA 2017.1.4\lib\idea_rt.jar=19176:D:\Software Installation Office\IntelliJ_IDEA\IntelliJ IDEA 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath D:\IDEInstall\jdk1.8\jre\lib\charsets.jar;D:\IDEInstall\jdk1.8\jre\lib\deploy.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\access-bridge-64.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\cldrdata.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\dnsns.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\jaccess.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\jfxrt.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\localedata.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\nashorn.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\sunec.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\sunjce_provider.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\sunmscapi.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\sunpkcs11.jar;D:\IDEInstall\jdk1.8\jre\lib\ext\zipfs.jar;D:\IDEInstall\jdk1.8\jre\lib\javaws.jar;D:\IDEInstall\jdk1.8\jre\lib\jce.jar;D:\IDEInstall\jdk1.8\jre\lib\jfr.jar;D:\IDEInstall\jdk1.8\jre\lib\jfxswt.jar;D:\IDEInstall\jdk1.8\jre\lib\jsse.jar;D:\IDEInstall\jdk1.8\jre\lib\management-agent.jar;D:\IDEInstall\jdk1.8\jre\lib\plugin.jar;D:\IDEInstall\jdk1.8\jre\lib\resources.jar;D:\IDEInstall\jdk1.8\jre\lib\rt.jar;D:\workspace\IntellijIDEA\Home\database\target\classes;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-devtools\2.1.7.RELEASE\spring-boot-devtools-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot\2.1.7.RELEASE\spring-boot-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-context\5.1.9.RELEASE\spring-context-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-autoconfigure\2.1.7.RELEASE\spring-boot-autoconfigure-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter-jdbc\2.1.7.RELEASE\spring-boot-starter-jdbc-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter\2.1.7.RELEASE\spring-boot-starter-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter-logging\2.1.7.RELEASE\spring-boot-starter-logging-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\IDEInstall\RepMaven\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\IDEInstall\RepMaven\org\apache\logging\log4j\log4j-to-slf4j\2.11.2\log4j-to-slf4j-2.11.2.jar;D:\IDEInstall\RepMaven\org\apache\logging\log4j\log4j-api\2.11.2\log4j-api-2.11.2.jar;D:\IDEInstall\RepMaven\org\slf4j\jul-to-slf4j\1.7.26\jul-to-slf4j-1.7.26.jar;D:\IDEInstall\RepMaven\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\IDEInstall\RepMaven\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;D:\IDEInstall\RepMaven\com\zaxxer\HikariCP\3.2.0\HikariCP-3.2.0.jar;D:\IDEInstall\RepMaven\org\slf4j\slf4j-api\1.7.26\slf4j-api-1.7.26.jar;D:\IDEInstall\RepMaven\org\springframework\spring-jdbc\5.1.9.RELEASE\spring-jdbc-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-beans\5.1.9.RELEASE\spring-beans-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-tx\5.1.9.RELEASE\spring-tx-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.1.0\mybatis-spring-boot-starter-2.1.0.jar;D:\IDEInstall\RepMaven\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.1.0\mybatis-spring-boot-autoconfigure-2.1.0.jar;D:\IDEInstall\RepMaven\org\mybatis\mybatis\3.5.2\mybatis-3.5.2.jar;D:\IDEInstall\RepMaven\org\mybatis\mybatis-spring\2.0.2\mybatis-spring-2.0.2.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter-web\2.1.7.RELEASE\spring-boot-starter-web-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter-json\2.1.7.RELEASE\spring-boot-starter-json-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\com\fasterxml\jackson\core\jackson-databind\2.9.9\jackson-databind-2.9.9.jar;D:\IDEInstall\RepMaven\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\IDEInstall\RepMaven\com\fasterxml\jackson\core\jackson-core\2.9.9\jackson-core-2.9.9.jar;D:\IDEInstall\RepMaven\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.9\jackson-datatype-jdk8-2.9.9.jar;D:\IDEInstall\RepMaven\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.9\jackson-datatype-jsr310-2.9.9.jar;D:\IDEInstall\RepMaven\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.9\jackson-module-parameter-names-2.9.9.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter-tomcat\2.1.7.RELEASE\spring-boot-starter-tomcat-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\apache\tomcat\embed\tomcat-embed-core\9.0.22\tomcat-embed-core-9.0.22.jar;D:\IDEInstall\RepMaven\org\apache\tomcat\embed\tomcat-embed-el\9.0.22\tomcat-embed-el-9.0.22.jar;D:\IDEInstall\RepMaven\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.22\tomcat-embed-websocket-9.0.22.jar;D:\IDEInstall\RepMaven\org\hibernate\validator\hibernate-validator\6.0.17.Final\hibernate-validator-6.0.17.Final.jar;D:\IDEInstall\RepMaven\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\IDEInstall\RepMaven\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\IDEInstall\RepMaven\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;D:\IDEInstall\RepMaven\org\springframework\spring-web\5.1.9.RELEASE\spring-web-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-webmvc\5.1.9.RELEASE\spring-webmvc-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-aop\5.1.9.RELEASE\spring-aop-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-expression\5.1.9.RELEASE\spring-expression-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\net\minidev\json-smart\2.2.1\json-smart-2.2.1.jar;D:\IDEInstall\RepMaven\net\minidev\accessors-smart\1.1\accessors-smart-1.1.jar;D:\IDEInstall\RepMaven\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;D:\IDEInstall\RepMaven\org\springframework\boot\spring-boot-starter-thymeleaf\2.1.7.RELEASE\spring-boot-starter-thymeleaf-2.1.7.RELEASE.jar;D:\IDEInstall\RepMaven\org\thymeleaf\thymeleaf-spring5\3.0.11.RELEASE\thymeleaf-spring5-3.0.11.RELEASE.jar;D:\IDEInstall\RepMaven\org\thymeleaf\thymeleaf\3.0.11.RELEASE\thymeleaf-3.0.11.RELEASE.jar;D:\IDEInstall\RepMaven\org\attoparser\attoparser\2.0.5.RELEASE\attoparser-2.0.5.RELEASE.jar;D:\IDEInstall\RepMaven\org\unbescape\unbescape\1.1.6.RELEASE\unbescape-1.1.6.RELEASE.jar;D:\IDEInstall\RepMaven\org\thymeleaf\extras\thymeleaf-extras-java8time\3.0.4.RELEASE\thymeleaf-extras-java8time-3.0.4.RELEASE.jar;D:\IDEInstall\RepMaven\com\alibaba\druid\1.1.8\druid-1.1.8.jar;D:\IDEInstall\RepMaven\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\IDEInstall\RepMaven\mysql\mysql-connector-java\8.0.17\mysql-connector-java-8.0.17.jar;D:\IDEInstall\RepMaven\org\springframework\spring-core\5.1.9.RELEASE\spring-core-5.1.9.RELEASE.jar;D:\IDEInstall\RepMaven\org\springframework\spring-jcl\5.1.9.RELEASE\spring-jcl-5.1.9.RELEASE.jar com.ch.home.utils.SnowFlake
359527394232639488
359527394232639489
359527394232639490
359527394232639491
359527394232639492
359527394232639493
359527394236833792
359527394236833793
359527394236833794
359527394236833795
359527394236833796
359527394236833797
359527394236833798
359527394236833799
359527394236833800
359527394236833801

Process finished with exit code 0

However, there is something wrong with the insertion of this device into the database (the table is built too lazily to change, it will not be restored), and the range of int is far from enough for the long string of numbers.

In mysql, int ranges from - 2 ^ 31 (- 2, 147, 483, 648) to 2 ^ 31 (- 2, 147, 483, 647). Integer data (All digits), storage size is 4 bytes;
So that's not enough, so I changed int to bigint, which ranged from - 2 ^ 63 (- 9223372036854775808) to 2 ^ 63 - 1 (9223372036854775807). Integer data (All numbers). Storage size is 8 bytes.
All right.

What's interesting is that my data is defined in this way.
image.png
In theory, we can't store such a long number, which is interesting. I guess mysql should expand it for him. As long as it doesn't exceed the limit of bigint, it should be able to save. The reason why we can't store ints before is that the number of digits far exceeds the limit.~~~