New posts for Spring and Hibernate

This commit is contained in:
2026-11-06 01:05:17 +05:30
parent b83cc9988e
commit 0245c00033
57 changed files with 2113 additions and 0 deletions
@@ -0,0 +1,22 @@
package com.ankurm.idgen;
import jakarta.persistence.*;
import java.util.UUID;
import org.hibernate.annotations.UuidGenerator;
/** @UuidGenerator(style = TIME): a version 1 (Gregorian time) UUID with Hibernate's own layout. Not version 7. */
@Entity
public class UuidTimeItem {
@Id
@UuidGenerator(style = UuidGenerator.Style.TIME)
private UUID id;
private String name;
public UuidTimeItem() {}
public UuidTimeItem(String name) { this.name = name; }
public UUID getId() { return id; }
public String getName() { return name; }
}