The default value of SpringBoot Jpa MySql field is CURRENT_TIMESTAMP invalidation

problem description

I created a table in the mysql database, one of which is the CURRENT_TIMESTAMP,
of the default value of the field create_time. I added a new piece of data when I did the hope test in the project. The
project uses the SpringBoot framework to form a print society relationship between jpa and the table and manipulate the table.
after adding new data successfully, I found that the value of create_time is null

Baidu google did not find a way to solve the problem. I"m here to inquire. Thank you!
here are the relevant screenshots

mysql8

Mar.28,2021

create table tablename (
 
    `create_time` timestamp not null default current_timestamp comment '',
 

have encountered the same situation before
if your sql creates the table format correctly,
do not write the createtime and updatetime attributes in your entity class, because once the parameter is passed in, it will be updated to null

/ 0718 noon update
must take the value of two times and implement update automatic update modified as follows (passed the test)
annotate the entity class @ EntityListeners (AuditingEntityListener.class)
annotate the two attributes
@ CreatedDate @ LastModifiedDate
annotate @ EnableJpaAuditing
on your startup class * * application-- test save and update

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35f7b-2b752.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35f7b-2b752.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?