concurrency
This commit is contained in:
@@ -4,6 +4,7 @@ import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@@ -34,6 +35,6 @@ public class Message {
|
||||
|
||||
@PrePersist
|
||||
private void onCreate() {
|
||||
this.createdAt = Instant.now();
|
||||
this.createdAt = Instant.now().truncatedTo(ChronoUnit.MILLIS);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user